Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I'm trying to create a visual to show the average month over month for each priority.
If you look at this photo below this shows the data I'm working with:
For each month within the year I need to show the total for each priority and the percentage of met. Feb for example would show: 27 for the total and 81% for the met. I believe this could be done by creating new columns within the dataset and using IF statements to make them a 1 or 0 after which performing an add and divide. However, I believe there is an easier way.
Thank you for your help!
Solved! Go to Solution.
Hi @Anonymous
try measures
Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )
and
%Met =
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)
Hi @Anonymous
try measures
Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )
and
%Met =
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)
Hi @az38,
This is very helpful! I did hit a little bit of a snag with this. It appears this requires a measure within a measure for me to get the count of incident number. I've created a measure to perform that; however, I'm getting the below error:
Hi @Anonymous
for using measure inside SUM() try SUMX() function like
Total for priority = CALCULATE(SUMX(Sheet1, [Count of Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) )
@Anonymous
You tried to use SUM that does not need a table but can work only with Columns
SUMX(), COUNTX, AVERAGEX() are working with expressions. you can read here https://docs.microsoft.com/en-us/dax/sumx-function-dax
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |