Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I have IndicatorsData table with historical data of actual coefficients across different indicator names.
I want to create a table visual, which will return the average actual coefficient for each indicator name, but for the last selected year only. So, if there is a multiple selection in a year slicer, the table should display the average coefficient only for the maximum of selected years. I created a measure
However, there are missing data. And of there is no data for last_selected_year for a particular indicator, I want the table visual to display nothing.
I created a measure for calculating the avg coefficient. But in case of missing data it returns last non blank value, while I want it to return blank or at least 0.
Pbix file to play with.
Solved! Go to Solution.
read a book "Power BI DAX Simplified" :- Chapter 7: Caution When Using Variables in DAX and Power BI
Is this what you are looking for?
yes, exactly! omg thanks!
could you pls explain why if I create a measure "last_selected_year" outside the "actual_coeff_last_year", the latter behaves differently than if we would create a varibale "last_selected_year" inside the "actual_coeff_last_year"? So counterintuitive...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |