Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a visual that shows percentage of shoppers who rated individual brands above a certain rating number. To caluclate the percentage, I need to find the total number of shoppers at the brand level as a category. I am using the following query. It does give me the required total value on its own, but is drills down to each brand when I put it in the table (shown below). From the table shown, the brands, Maserati, Alfa Romeo, and Fisker show incorrect total value. It should the 228333. This is messing up my percentage calculations. What do I have to do to get a scalar value?
Total Shopper Count =
CALCULATE (
DISTINCTCOUNT ( 'Rating Table'[Shopper Id] ),
ALL ( 'Rating Table'[Rating Number] ),
'Rating Table'[Marketing Insight Attribute Name] = "Brand"
)
Solved! Go to Solution.
HI @ravimerugu
I think I see what you are trying to do.
Try this variation and see if this helps
Total Shopper Count = CALCULATE ( DISTINCTCOUNT ( 'Rating Table'[Shopper Id] ), ALLEXCEPT( 'Rating Table','Rating Table'[Marketing Insight Attribute Name] ), 'Rating Table'[Marketing Insight Attribute Name] = "Brand" )
HI @ravimerugu
I think I see what you are trying to do.
Try this variation and see if this helps
Total Shopper Count = CALCULATE ( DISTINCTCOUNT ( 'Rating Table'[Shopper Id] ), ALLEXCEPT( 'Rating Table','Rating Table'[Marketing Insight Attribute Name] ), 'Rating Table'[Marketing Insight Attribute Name] = "Brand" )
Thanks so much, Phil! That did the trick!!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
44 | |
38 | |
37 |