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.
Hope you can help me figure this one out. I have a table, and I am trying to calculate total area based on the a slicer applied to the page, as well as a weighted value based off the percentage of total area.. The slicer is a drop down to select the year. I have a measure that is calculating the total area based on the slicer:
Area Total =
CALCULATE(SUM('DDx Export'[Total area]),
'DDx Export'[Percent reduction] > 0,
ALLSELECTED('DDx Export')
)
This works, and updates the total based on the slicer. The next measure I am using calculates the percentage of the total area using the following measure:
Percentage of Total Area = (SELECTEDVALUE('DDx Export'[Total area])/[Area Total])
This is where things start to go werid. The calculation works mostly. Some of the values are just blank. Any Idea why this wold be? See image below:
Close to the bottom of the image you can see the area 668,832.80. This should calculate to around 4.4% but it is just blank.
Same thing is happening for weighted Net_pEUI measure, but to a larger degeree. I have attached a link to the file in case that helps.
Download: Sustainability Data.pbix
Solved! Go to Solution.
This can be resolved with an explicit measure:
Sum Total Area = SUM ( 'DDx Export'[Total area] )
Adjust your % measure as follows:
Percentage of Total Area = DIVIDE ( [Sum Total Area], [Area Total] )
It's best practice to use explicit measures--they're more robust than implicit measures.
Proud to be a Super User!
@DataInsights
Thank you. That did it. I was also able to update my other calculations using the same methodology.
This can be resolved with an explicit measure:
Sum Total Area = SUM ( 'DDx Export'[Total area] )
Adjust your % measure as follows:
Percentage of Total Area = DIVIDE ( [Sum Total Area], [Area Total] )
It's best practice to use explicit measures--they're more robust than implicit measures.
Proud to be a Super User!