Forum Discussion
Power BI Data Labels Error
- 4 years ago
EDIT:
MIRZAMU
So, it turn out. Using ALL() makes it difficult to use the Filter pane to filter out a person, but is good at crossfiltering. Using Allselected() in stead of ALL() is bad at cross filtering but good at using the filter pane so...you can create 3 measure
Best Measure ever = IF( COUNTROWS(ALLSELECTED('Table'[Name])) = 1, [%GT Measure], //If a crossfilter selection is made [%GT Measure 2] //If no crossfilter )%GT Measure = Var _SelectedWorker = CALCULATE( SUM('Table'[PriceCheck]) ) Var _Total =CALCULATE( SUM('Table'[PriceCheck]) // ,filter(ALL('Table'[Name]), 'Table'[Name] <> "Candy") ,ALL('Table'[Name]) ) Return DIVIDE(_SelectedWorker, _Total)%GT Measure 2 = Var _SelectedWorker = CALCULATE( SUM('Table'[PriceCheck]) ) Var _Total =CALCULATE( SUM('Table'[PriceCheck]) // ,filter(ALL('Table'[Name]), 'Table'[Name] <> "Candy") ,ALLSELECTED('Table'[Name]) ) Return DIVIDE(_SelectedWorker, _Total)This set up should be good for both using the filter pane and cross filtering
That looks to have solved the problem, however I am fairly new to PBI and don't understand DAX.
Is there a way you can help me formulate this DAX Code to be specific to my sheet please? As I was trying to replicate it I was finding it tricky
I'm my dummy dataset i just called the table for 'table'
I see that you called your table for 'data'. You would need to replace 'table' with 'data' for this measure to work.
On further inspection i'm also seeing that Price Check is not a column by itself, but rather a category in a column, is that correct?
I'd need some data samples to give a more precise feedback.