The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have one table named survey that contains rating numbers. I want to group these numbers based on certain conditions. For this, I have created another table named SupportTable. Based on the min and max from this table I want to group the rating. For this, I tried the following code but didn't get the desired result. I want to get the result in measure( Numbers Per Group). What I am doing wrong here?
Total number of feedback = COUNTROWS(Survey) #counts no of rows in survey table
Numbers Per Group = CALCULATE([Total number of feedback],
FILTER(VALUES(Survey[Rating]),
COUNTROWS(
FILTER('SupportTable',
Survey[Rating]>= 'SupportTable'[Min]
&& Survey[Rating]< 'SupportTable'[Max]))
>0))
Solved! Go to Solution.
Hi @Anonymous
Numbers Per Group =
VAR min_ = SELECTEDVALUE ( 'SupportTable'[Min] )
VAR max_ = SELECTEDVALUE ( 'SupportTable'[Max] )
RETURN
COUNTROWS ( FILTER ( Survey, Survey[Rating] >= min_ && Survey[Rating] < max_ ) )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@Anonymous , You have to use your independent table in measures and also need to push row context.
refer to my video on a similar topic can help you
Hi @Anonymous
Numbers Per Group =
VAR min_ = SELECTEDVALUE ( 'SupportTable'[Min] )
VAR max_ = SELECTEDVALUE ( 'SupportTable'[Max] )
RETURN
COUNTROWS ( FILTER ( Survey, Survey[Rating] >= min_ && Survey[Rating] < max_ ) )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@Anonymous , refer if my video on similar topic can help you
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |