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.
Here is an example of my dataset:
DaystoMagicMoment AccountID
1 Account1
1 Account2
2 Account 3
2 Account 4
I want to create a chart that woud show that 2 acccounts match DaytomagicMoment=1 and 4 Accounts when DaytomagicMoment=2.
I have tried each of these, with no luck.
1) Rolling Totals on the DistinctCount of AccountID
2) Measure = CALCULATE(DISTINCTCOUNT(Contributions[AccountID]),FILTER(Contributions,Contributions[DaystoMagicMoment]<=Contributions[DaystoMagicMoment]))
3)Measure 2 = SUMX(VALUES(Contributions[DaystoMagicMoment]),CALCULATE(DISTINCTCOUNT(Contributions[AccountID])))
Feels like this should be really easy, but no luck so far. Thanks for any help you can provide
Hi @jofoster
Try following
Measure = VAR myDay = SELECTEDVALUE ( Contributions[DaystoMagicMoment] ) RETURN CALCULATE ( DISTINCTCOUNT ( Contributions[AccountID] ), Contributions[DaystoMagicMoment] <= myDay )
Thanks for the reply, but still not working for me
I converted your measure to
TotalAccountsv2 = VAR MyDay = SELECTEDVALUE(Contributions[DaystoMagicMoment]) RETURN CALCULATE(DISTINCTCOUNT(Contributions[AccountID]),Contributions[DaystoMagicMoment]<=MyDay.
This yields the output below, which is not only obviousily incorrect ( i.e., each succeeding day should be greater than the day before), but also the Day 1 count is to high when compared to the actual data.
Appreciate your guidance. thanks
It seems to work. Show us more information if possible.
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 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |