Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help please! - Group Tagging Error

Problem: Wrong tagging of group

 

Formula:

Grp = if(DISTINCTCOUNT(df_Fleet_Size[Service_Number]) <= 100, "0-100", if(and(DISTINCTCOUNT(df_Fleet_Size[Service_Number])>=101,DISTINCTCOUNT(df_Fleet_Size[Service_Number])<=300), "101-300", if(and(DISTINCTCOUNT(df_Fleet_Size[Service_Number])>=301,DISTINCTCOUNT(df_Fleet_Size[Service_Number])<=600), "301-600",if(DISTINCTCOUNT(df_Fleet_Size[Service_Number]) > 600, "Above 600", "NA"))))
 
Screenshot:
jdalfonso_0-1629886487215.png

 

 

Goal: Grp should be "301-600" and it must update whenever I filter month or any other filter. FOr example if I select June 2021, and count of service number became 100, Grp must be "0-100". 

 

 

When I use this formula, the measure is constant across every month filter I select:

 

Fleet_Size = CALCULATE (
DISTINCTCOUNT( 'df_Fleet_Size'[Service_Number]),
ALLEXCEPT (
'df_Fleet_Size', 'df_Fleet_Size'[CIDN]
)
)
 
jdalfonso_0-1629888103751.png

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

maybe try add the month column in the allexcept.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Has your problem been solved? 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

 

Best Regards,
Winniz

v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

I can get correct result using your measure Grp in my sample data. Could you please share your PBIX file without sensitive data?

 

vkkfmsft_0-1630050642931.png

 

Best Regards,
Winniz

ryan_mayu
Super User
Super User

@Anonymous 

maybe try add the month column in the allexcept.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors