March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I want to create a measure that counts distinct visit days (metric date) per customer that changes based on brand, channel and date filters. This is an example of the table that I have:
With the above in mind, if Brand ID = 2 is filtered on report, it should show 2 distinct visit days.
If Brand = 2 and Channel = 3, it should show 1.
If Customer ID = 1 & 2, it should show 2 visit days.
A distinctcount will obviously exclude the same visit day across customers. I don't know how to amend this to get a count of unique metric dates per customer that then also changes depending on brand and channel filters.
If anyone can help that would be greatly appreciated.
Solved! Go to Solution.
Hi @Anonymous
Try this Measure.
Measure =
COUNTROWS(
SUMMARIZE( 'Table', 'Table'[Customer ID], 'Table'[metric date] )
)
Hi @Anonymous
Try this Measure.
Measure =
COUNTROWS(
SUMMARIZE( 'Table', 'Table'[Customer ID], 'Table'[metric date] )
)
Here is an example of some of the data from one customer:
Using COUNTROWS(SUMMARIZE('Table', customer_id, metric_date)) works when filtering by brand or channel, however, unfiltered this shows the number of visit days as 5. However, this should show as 4 since there are only 4 unique metric dates.
Calling @Anonymous for a solution on this one (if that's acceptable). Please help
@Mariuszthis works when filtering on brand and channel but across the entire table, unfiltered, I get too many records. It looks like some dates are being double counted.
Any thoughts?
@Anonymous , Try like can help
sumx(summarize(Table,Table[Customer ID],Table[Channel],"_1",distinctcount(Table[Date])),[_1])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
22 | |
19 | |
17 | |
9 | |
5 |
User | Count |
---|---|
37 | |
29 | |
16 | |
14 | |
12 |