Forum Discussion
How To Ignore Column Value in a Measure
Hello,
I'm having a Matrix that holds values in the rows and in a column weather Yes or No the value was Budgetted.
We are Showing the % of the Row Value. But now I would also display the total amount, so that the user gets an idea that his (ex) 15% non budgetted is 15% of the total value (Bidgetted+Nonbudgetted)
The idea is that When Column is No we just use BLANK() so that there is never a value printed, and on the Yes column we show the sum of Yes and No. I know its a bit a strange way but for now I don't think I can get it visualized otherways.
But my Dax formula doesn't work, this is what happens
Hi LeboeufHarry
If I understood you correctly you can use the measures :base_sum = sum('Table'[Value])Yes(%) = divide(CALCULATE([base_sum],'Table'[Reserved]="yes"),[base_sum])No(#) = divide(CALCULATE([base_sum],'Table'[Reserved]="no"),[base_sum])And put them in the table visual :
The pbix is atached
5 Replies
- LeboeufHarryHelper I
Even a better solution ! KR.
- Ritaf1983Super User
Happy to help 🙂
- Ritaf1983Super User
Hi LeboeufHarry
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - LeboeufHarryHelper I
Hereby the table of sample data and the wanted result for this data.
Type Reserved Value S0 Yes 50 S0 Yes 10 S0 No 15 S1 Yes 100 S1 No 10 S2 Yes 200 S3 No 120 - Ritaf1983Super User
Hi LeboeufHarry
If I understood you correctly you can use the measures :base_sum = sum('Table'[Value])Yes(%) = divide(CALCULATE([base_sum],'Table'[Reserved]="yes"),[base_sum])No(#) = divide(CALCULATE([base_sum],'Table'[Reserved]="no"),[base_sum])And put them in the table visual :
The pbix is atached