The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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...