Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi guys,
I am getting mad with this one... Hope you can help. Basically I need a table showing
Years,MS%, %GR in a same table so I create them as Values and add them in the matrix. I get something like that, it is a big table but my bosses want it like that and I am a good soldier 😞
OK so I created a MAT both LY and LAST MAT. See my Dax that get me the correct result
OK so far so good it gets me the correct result...
The problem gets when I am calculating the % MS over this. With the Years my formula works fine
But then with the MS of the MAT it gets a wrong result as 150M/658M should be 22,8% and not 21,56% I get... not sure what is the issue
This is my DAX formula with MS that does not work with MAT
Please help
Best
Javier
Solved! Go to Solution.
Thanks for the reply from Ritaf1983.
Hi @javif_84 ,
Please try the following DAX formula:
LAST MAT MS%1 = DIVIDE([LAST MAT],CALCULATE([LAST MAT],ALLSELECTED('Output')))
Result:
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @javif_84
Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.
See a sample PBIX from the data with all my formulas etc https://we.tl/t-XOy9qreMEU
As you may see now with this limited set of data my formula for MS for MAT LAST "MAT %MS" works (it always happens) but for my dataset it does not work out. Is there another way to calculate MS?
I cannot send you my real dataset as it is sensitive information.
Not sure what can be happening
Hi Rita
See a PBIx sample with Company A/B, dummy data
As it always happen now the formula works but in my sample the LAST MAT MS% does not work, not sure why...
See the link in WeTransfer https://we.tl/t-ktB8dxPav8
Thanks
Best
Javi
OK sorry even in this dataset the formula does not work which is great 🙂
Absolute figures and MS
This is what I get in Excel
Thanks for the reply from Ritaf1983.
Hi @javif_84 ,
Please try the following DAX formula:
LAST MAT MS%1 = DIVIDE([LAST MAT],CALCULATE([LAST MAT],ALLSELECTED('Output')))
Result:
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks so much Zhu! One question, what was the issue? Why a sumx wasn t giving me the proper result?
Hi @javif_84 ,
In DAX, measure is computed based on context, which means that they determine their values based on the current filter conditions and the context. Directly referencing a measure ensures that it is calculated correctly in the current context. SUMX function is an iterative function that calculates and sums each row in a table. Using SUMX function is summing each row. But the calculation of the measure depends on the context of the entire visual rather than a single row of data.
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
87 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |