Forum Discussion
Data grouping for graphical use
- 8 years ago
Most people use this:
https://msdn.microsoft.com/en-us/query-bi/dax/dax-function-reference
For the first one it would be something like:
Measure = SWITCH( MAX([Parameters!Grouping.Value]), "Department",MAX([Fields!Department.Value]), "Division",MAX([Fields!Division.Value]), "Location",MAX([Fields!Location.Value]) )But, incredibly difficult to say without sample/example data. And I'm not even sure you want to be using DAX honestly, you might want to use M (Power Query). Just not nearly enough information to know.
Seems like you would use the SWITCH statement in DAX for that but tough to say exactly. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Apologies fo rthe poorly worded question.....but how could i use the switch function in DAX??? happy to learn..
- Greg_Deckler8 years agoCommunity Champion
Most people use this:
https://msdn.microsoft.com/en-us/query-bi/dax/dax-function-reference
For the first one it would be something like:
Measure = SWITCH( MAX([Parameters!Grouping.Value]), "Department",MAX([Fields!Department.Value]), "Division",MAX([Fields!Division.Value]), "Location",MAX([Fields!Location.Value]) )But, incredibly difficult to say without sample/example data. And I'm not even sure you want to be using DAX honestly, you might want to use M (Power Query). Just not nearly enough information to know.
- Anonymous8 years agoNot applicable
Thanks for the reply...
Let me get some sample data to you. with a better example and explanation. Much Appreicated,
- Anonymous8 years agoNot applicable
Hi Greg
This is what I am trying to do with the data....
I have tried to Turn on responsive under "General" formatting and Turn off "Concatenate labels" under..
Or get
- Anonymous8 years agoNot applicable
Image in the previous post has some sample data...I was looking at SQL Syntax and trying to replicate that in Power BI..the table name is Data_ columns are also called division location and department..