Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi,
I have the following table 'DATA'
| CATEGORY | ITEM | DATETIME | VALUES |
| 1 | A | 01/01/2020 09:00:00 | 1 |
| 1 | A | 01/01/2020 09:00:00 | 0 |
| 1 | A | 01/01/2020 09:00:00 | 1 |
| 1 | A | 01/01/2020 09:00:00 | 0 |
| 1 | B | 01/01/2020 09:00:00 | 0 |
| 1 | B | 01/01/2020 09:00:00 | 0 |
| 1 | B | 01/01/2020 09:00:00 | 0 |
| 1 | B | 01/01/2020 09:00:00 | 0 |
| 1 | A | 01/01/2020 09:05:00 | 1 |
| 1 | A | 01/01/2020 09:05:00 | 1 |
| 1 | A | 01/01/2020 09:05:00 | 1 |
| 1 | A | 01/01/2020 09:05:00 | 0 |
| 1 | B | 01/01/2020 09:05:00 | 0 |
| 1 | B | 01/01/2020 09:05:00 | 0 |
| 1 | B | 01/01/2020 09:05:00 | 0 |
| 1 | B | 01/01/2020 09:05:00 | 1 |
| 1 | A | 01/01/2020 09:10:00 | 0 |
| 1 | A | 01/01/2020 09:10:00 | 0 |
| 1 | A | 01/01/2020 09:10:00 | 0 |
| 1 | A | 01/01/2020 09:10:00 | 0 |
| 1 | B | 01/01/2020 09:10:00 | 0 |
| 1 | B | 01/01/2020 09:10:00 | 0 |
| 1 | B | 01/01/2020 09:10:00 | 0 |
| 1 | B | 01/01/2020 09:10:00 | 0 |
If the sum of the [VALUES] for an [ITEM] in any given 5 minute period >0 then the [ITEM] is deemed to have been used, so effectively creating this table below;
| CATEGORY | ITEM | DATETIME | VALUE |
| 1 | A | 01/01/2020 09:00:00 | 1 |
| 1 | B | 01/01/2020 09:00:00 | 0 |
| 1 | A | 01/01/2020 09:05:00 | 1 |
| 1 | B | 01/01/2020 09:05:00 | 1 |
| 1 | A | 01/01/2020 09:10:00 | 0 |
| 1 | B | 01/01/2020 09:10:00 | 0 |
I want to know the utilisation of each item over the periods so;
ITEM A has been used on two of its three periods giving utilisation of 66.6%
ITEM B has been used on one of its three periods giving utilisation of 33.3%
Using this Measure in a matrix;
Utilisation% =
(SUMX(
SUMMARIZE(
DATA,
DATA[DATETIME],
"Count", if (SUM(DATA[VALUES])>0,1,if (SUM(DATA[VALUES])=0,0,0))),[Count]))/(DISTINCTCOUNT(DATA[DATETIME])*DISTINCTCOUNT(DATA[ITEM])
gives the correct utilisations at the individual [ITEM] level
BUT
at the [CATEGORY] level the measure is wrong showing 33.3% (2 uses out of 6) instead of (3 uses out of 6) 50.0%. This is because it is applying the measure at the [CATEGORY LEVEL] and when A & B are used together giving 2 uses at 09:005:00 it is converting this total to a 1.
Can anyone help to make the totals correct.
Solved! Go to Solution.
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
All sorted, thanks Greg
Thansk Greg,
All makes sense, but im having trouble with the measure to achieve the desired results. Fancy having a look and see if you can solve?
Appreciate any help at all
Paul
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 34 | |
| 32 | |
| 29 |