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.
# DeviceUsed = Distinctcount Divice ID
week 2: 92 device is used,
Week 3: 94 device is used,
But Week 2 and 3 : 97 device is used.
So I am trying to do the avg device use between week 2 and 3,
instead of doing 92+94 / 2 = 93 ;
I got 97/2 = 48..
Can any one help me with this?
Solved! Go to Solution.
Please try this expression which, since you indicated you have a Calendar table, is a variation on the solution proposed by @amitchandak
NewMeasure = AVERAGEX(VALUES('Calendar'[Week]), CALCULATE(DISTINCTCOUNT(Table_1[Device ID])))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @Anonymous,
It sounds like a common requirement to apply multiple aggregate functions into DAX expressions. I'd like to suggest you take a look at the following blog to apply multiple aggregations.
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
@Anonymous , Try like
averageX(Table[week],[Avg Measure])
@amitchandak That was a super quick response. However, that's not what i need. (or am i missing something?)
My raw table_1 looks like
Device ID | Event Date
Device 1 | DD/MM/YY
......
Device 99 | DD/MM/YY
And week of the year is on a calendar table.
So when i do distcincount of Device ID, week 2 = 92, and week 4 = 94, how do i get averge of 94?
according to you. I will do averagex(table_1[Event Date], and ? ). can you explain further please?
Thank you
Please try this expression which, since you indicated you have a Calendar table, is a variation on the solution proposed by @amitchandak
NewMeasure = AVERAGEX(VALUES('Calendar'[Week]), CALCULATE(DISTINCTCOUNT(Table_1[Device ID])))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |