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
My datamodel is a typical multiple questionare model with bothways joins for all the dimensions with one Fact having each surveyId once and then the dimensions can have the several answers for every question (the model is described in here several threads):
I was asked to show percentage of total, for this question:
Where 'Ukendt' (=Unknown) is removed. That's when the trouble started 😞
I normally would use this measure to create a grand total:
Diagnose andel = DIVIDE (
[Antal respondenter],
CALCULATE ( [Antal respondenter], ALLSELECTED(DimDiagnose[Hvilken diagnose havde personen?]))
)
But the total is wrong:
I removed other answers in the table, but the chart for the same answers show the same amount. But the total is wrong as can be seen. I can create this pie chart:
And the percentage is correct, but I would prefer the stack chart and that I could calculate the total myself. What am I missing?
Solved! Go to Solution.
Hi @Bokazoit ,
For this you need to create a measure that calculates the total value best option is that measure is a new one so you can easily debug and reuse it.
Try the following code:
Total Value = SUMX(Values(Table[Hvorfor var samtalerne ikke laenger?]),[Your Metric])
If you need this to be used in several metrics you must create a calculation item.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Bokazoit ,
For this you need to create a measure that calculates the total value best option is that measure is a new one so you can easily debug and reuse it.
Try the following code:
Total Value = SUMX(Values(Table[Hvorfor var samtalerne ikke laenger?]),[Your Metric])
If you need this to be used in several metrics you must create a calculation item.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsTx that did the trick 🙂
Total Value =
DIVIDE([Antal samtaler],
CALCULATE(
SUMX(Values('DimSamtaleLængde'[Hvorfor var samtalerne ikke længere?]),[Antal samtaler]),
ALLSELECTED('DimSamtaleLængde'[Hvorfor var samtalerne ikke længere?])
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |