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.
Hi,
I've looked through all the countif solutions here, but my issue seems a bit different.
Basically the spreadsheet report has a pivot table on top of a data set. The Pivot is Name and Max(Frequency)
The Countif references that table and puts the frequencies into buckets: 1,2,3,4,5+.
In SQL I would have solved this issue with a dense rank with over (partition by).
The issue I have is that my count is counting underlying rows in the data table, instead of counting at face value.
How do I ignore underlying transactions?
I'm using the following calc for #/bucket:
#/bucket = COUNTAX('DAILY SALES',
CALCULATE (
MAXA('DAILY SALES'[Frequency Factor Bucket]),
FILTER (
'DAILY SALES',
'DAILY SALES'[Frequency Factor Bucket] = EARLIER('DAILY SALES'[Frequency Factor Bucket] )
)
)
)
Below I have the frequency I want to count, my current result in yellow, and the result I want in orange.
The current calc in yellow is counting all the underlying transactions too.
Thanks in advance!
Basia
Solved! Go to Solution.
Hi All,
I have solved the issue myself.
It was mainly to do with context and my misunderstanding of it.
Solution is:
COUNTAX (
ALLSELECTED (Adviser[Adviser Name] ),
CALCULATE ( COUNTA (Sales[Frequency Factor Bucket]) )
)
Basia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |