Forum Discussion
RichardP
8 years agoHelper I
Grouping values from measures
Hi, I have a table that looks something like this: AccountID UserID Visits Help requests abc 111 5 0 abc 456 0 1 abc 789 15 2 def 555 2 2 def 666 0 1 ...
- 8 years ago
You should be able to do it like this:
Table = SUMMARIZE('TABLE','TABLE'[Column],"MyMeasure",[Measure])
kohlivinayak
8 years agoResolver I
Hi Greg_Deckler
Thanks for the reply
I have posted my query here
https://community.powerbi.com/t5/Desktop/Dynamic-Grouping-on-Sum/m-p/454924#M210785
I will try your measure and will update here.
Greg_Deckler
8 years agoCommunity Champion
OK, based on the data in the other post, I created a Category table with:
Category
| 0-50 percent |
| 51-75 percent |
| 75-100 percent |
And a measure like this:
Measure =
VAR __Date = MAX('Table'[date])
VAR __Category = MAX('Categories'[Category])
VAR __Low =
SWITCH(
__Category,
"0-50 percent",0,
"51-75 percent",.51,
"75-100 percent",.75
)
VAR __High =
SWITCH(
__Category,
"0-50 percent",.5,
"51-75 percent",.74,
"75-100 percent",1
)
VAR __tmpTable = SUMMARIZE('Table','Table'[userid],"__Percent",MAX('Table'[profilepercent]))
RETURN COUNTROWS(FILTER(__tmpTable,[__Percent]>=__Low && [__Percent]<=__High))PBIX is attached.