power bi Welcome to your power bi 1. What is DAX? Data Access eXperience Database Access XML Data Analytics Xtension Data Analysis eXpressions 2. What are the key features of DAX? Designed for data modeling and reporting Supports formula-based calculations Used in Power BI, Excel, and SQL Server Analysis Services All of the above 3. What is a calculated column in DAX? A column created by summing existing columns A column calculated based on a formula A column containing only text values A column created through sorting operations 4. What is a measure in DAX? A unit of length A column created by summing other columns A calculation performed on data A formatting option in Power BI 5. How do you define a calculated column in DAX? Using the ADDCOLUMNS function With the CALCULATE function By using the CREATE COLUMN statement Through the ADD COLUMN button in Power BI 6. How do you define a measure in DAX? Using the SUMMARIZE function With the DEFINE MEASURE statement By using the CALCULATE function Through the CREATE MEASURE button in Power BI 7. What is the difference between a calculated column and a measure in DAX? Measures are used for data formatting. Calculated columns are used for aggregations. Measures are dynamic and respond to user interactions. Calculated columns are static and precalculated. 8. How can you calculate the year-to-date sales using DAX? Using TOTALYTD function Applying FILTER on the Date column Creating a calculated column with cumulative sums All of the above 9. How do you calculate the total sales for a specific product using DAX? SUMMARIZE and FILTER functions TOTALQTD and CALCULATE functions RELATED and UNRELATED functions TOTALMTD and EARLIER functions 10. How do you use the IF function in DAX? Provide an example. IF(condition, value_if_true, value_if_false) IFELSE(condition, value_if_true, value_if_false) COND(condition, value_if_true, value_if_false) CASE(condition, value_if_true, value_if_false) 11. Difference between the SUM and SUMX functions in DAX? SUM is used for text columns, SUMX for numeric columns. SUMX is an iterator, while SUM is an aggregation function. SUMX is used for scalar values, SUM for tables. There is no difference; they are interchangeable. 12. Difference between the SUMMARIZE and ADDCOLUMNS functions in DAX? ADDCOLUMNS creates a new table, SUMMARIZE groups existing data. ADDCOLUMNS creates a new table, SUMMARIZE groups existing data. SUMMARIZE is used for text columns, ADDCOLUMNS for numeric columns. 13. How do you calculate the previous periodâ€™s sales using DAX? Using LAG function Using EARLIER and CALCULATE functions TOTALMTD and TOTALYTD functions Using PREVIOUS and NEXT functions 14. How do you calculate the cumulative sales for each month using DAX? Using TOTALYTD function Using ADDCOLUMNS and EARLIER functions Using FILTER and RELATED functions Using SUMX and DATESBETWEEN functions 15. How do you calculate the number of days between two dates using DAX? Using DATEDIFF function Applying ADDCOLUMNS on the Date table Using EARLIER and CALCULATE functions Using DATESBETWEEN function 16. How do you handle complex calculations involving multiple tables in DAX? Using RELATED and UNRELATED functions Creating relationships between tables Using EARLIER and CALCULATE functions All of the above 17. What is the role of the EARLIER function in DAX? Returns the previous row value Returns the first row value in a table Returns the current row value Returns the value before a specific date 18. How do you add or subtract a specific number of days from a date using DAX? Using DATEADD function Using ADDCOLUMNS and CALCULATE functions Applying FILTER on the Date column Using DATEDIFF function 19. How do you remove leading or trailing spaces from a text string using DAX? Applying ADDCOLUMNS on the text column Using CONCATENATEX function Using TRIM function Using EARLIER and CALCULATE functions 20. How do you format a date value using DAX? Using DATESBETWEEN function Applying ADDCOLUMNS on the Date column Using CONVERT function Using FORMAT function 21. What is the purpose of the UNION function in Power BI? Merging two tables Combining two queries Concatenating two columns Creating relationships between tables 22. What is the purpose of the RELATED function in DAX? Returns a related column value from another table Creates a new relationship between tables Filters data based on a condition Retrieves the next row value in a table 23. How do you handle errors in DAX? Using TRY...CATCH statements Applying IFERROR function Using EARLIER and CALCULATE functions Both a and b 24. What are query folding and how do they impact performance in Power BI? Query folding improves performance by folding operations into the data source. Query folding degrades performance by processing data locally. Query folding is not related to performance. Both a and b 25. What is the purpose of the INTERSECT function in DAX? Combines two tables into one Returns common values between two tables Retrieves distinct values from a column Filters data based on a condition 26. Explain the use of the EARLIER and EARLIEST functions in DAX with an example? EARLIER and EARLIEST perform the same function. EARLIER returns the first row value; EARLIEST returns the previous row value. EARLIER returns the previous row value; EARLIEST returns the first row value EARLIER is used for numeric columns; EARLIEST for text columns. 27. How do you set up time intelligence functions in Power BI to analyze patterns over time? By using the CALENDARAUTO function By creating relationships between Date tables Applying TOTALYTD and TOTALQTD functions All of the above 28. What is the purpose of the SELECTEDVALUE function in DAX? Returns the total value of a column Retrieves the selected value from a single-column table Filters data based on a condition Adds values from two columns 29. Explain the purpose of the KEEPFILTERS function in DAX and provide an example. KEEPFILTERS preserves existing filters; example: KEEPFILTERS(SUM(Sales)) KEEPFILTERS removes existing filters; example: REMOVEFILTERS(SUM(Sales)) KEEPFILTERS modifies existing filters; example: MODIFYFILTERS(SUM(Sales)) KEEPFILTERS has no impact on filters; example: SUM(Sales) 30. What is the purpose of the DETAILROWS function in DAX, and how would you use it? DETAILROWS returns detailed rows for a specific value; used in a table expression. DETAILROWS calculates the sum of detailed rows; used in a measure expression. DETAILROWS combines rows based on a condition; used in a table expression. DETAILROWS has no specific purpose in DAX. 31. How can you use DAX to dynamically select the top N items based on user input? Using the TOPN function with a variable Applying FILTER and RELATED functions Utilizing the SELECTEDVALUE function Both a and c 32. What is the purpose of the UNICHAR function in DAX? Converts a numeric value to Unicode character Returns the number of unique characters in a text string Concatenates two text strings Removes special characters from a text string 33. What is the role of the PATHCONTAINS function in DAX? Returns the common values between two paths Counts the number of nodes in a path Determines if a path exists between two nodes in a hierarchy Filters data based on a condition in a hierarchical structure 34. What is the purpose of the TREATAS function in DAX? Treats a table as a scalar value Treats values as if they are related Treats a column as a measure Treats a measure as a column 35. Can you name a few DAX functions used for time intelligence, and provide an example? TOTALYTD: TOTALYTD(SUM(Sales), Date[Date]) TOTALQTD: TOTALQTD(SUM(Revenue), Calendar[Date]) TOTALMTD: TOTALMTD(SUM(Quantity), 'Time'[Date]) DATESBETWEEN: DATESBETWEEN('Date'[Date], [Start Date], [End Date]) All of the above 36. Describe the difference between DAX's CONCATENATE and CONCATENATEX functions? CONCATENATE is used for numeric columns; CONCATENATEX for text columns. CONCATENATE is an iterator; CONCATENATEX is an aggregation function. Both functions perform the same operation. CONCATENATEX handles table expressions; CONCATENATE handles scalar values. 37. How do you calculate the percentage of total in DAX? Using DIVIDE and CALCULATE functions Applying PERCENTILE and RELATED functions Using CONCATENATEX and EARLIER functions Both a and b 38.