Forum Discussion
Help with DAX Measure
- Anonymous5 years ago
Hi Anonymous ,
Based on my test, I suggest you create a new table like this:
Then use the following formula to create measures:
1. For stacked bar chart:
count by date and type = VAR _t = ADDCOLUMNS ( DISTINCT ( SELECTCOLUMNS ( 'Data', "date", 'Data'[Date], "id", 'Data'[Marg ID] ) ), "Type", [Measure] ) RETURN COUNTX ( FILTER ( _t, [Type] = MAX ( 'Table(for legend)'[Value] ) ), [date] )2. For table:
count = CALCULATE(DISTINCTCOUNT(Data[Date]),FILTER('Data',[Measure]=MAXX('Data',[Measure])))The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Thanks for your suggestions
Is it possible to then graph it as a stacked bar chart ..
So per day, can I get a count of Partially Auto, Fully Auto and Manual
Sorry I'm quite new so your help is very much appreciated
- Ashish_Mathur5 years agoSuper User
Hi,
For that, we will have to write a calculated column formula (not a measure). Calculated column formulas do not respond to change in slicers.
- Anonymous5 years agoNot applicable
Thank you, I also realised I need to filter only on where Status is Issued, Agreed or Finalised. There seems to be another 2 statuses that are appearing in the data that need to be filtered out. Are you able to account for this requirement as well?