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
Hello, I would love some help on the the problem below.
My table contains a "status" column which as 11 possible text values. I need to calculate the following rates:
I realize that the first 2 rates are basicallly identical clacs (different filter/if logic), so I can derrive the formula for one from the other. Just wanted to present the whole picture. Unfortunatelly I am unable to share any data, so hoping that someone will be kind enough to help me with the DAX syntax / calculation logic.
Many thanks,
Yev
Solved! Go to Solution.
Something like...
Quoted hit =
VAR _QuoteStatus = CALCULATE(COUNTROWS(Table), Table[Status] IN (....))
VAR _HitStatus = CALCULATE(COUNTROWS(Table), Table[Status] IN (....))
VAR _AllStatus = CALCULATE(COUNTROWS(Table), REMOVEFILTERS(Table[Status]))
RETURN
DIVIDE(_QuoteStatus, _HitStatus)
* Note: I'm not using _AllStatus in the result. Trying to remember my school days Maths but I think it cancels out. If that's not right you can add a couple of extra steps to DIVIDE(_QuoteStatus, _AllStatus) & DIVIDE(_HitStatus, _AllStatus)
Hi, @YevD
I tried to create a sample pbix file based on the explanation.
please check the below picture and the sample pbix file's link down below.
All measures are in the sample pbix file.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @YevD
I tried to create a sample pbix file based on the explanation.
please check the below picture and the sample pbix file's link down below.
All measures are in the sample pbix file.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Jihwan_Kim,
I just tried your code and looks like the quote and hit measures return the count of the statuses I am interest in. Can you please help me out with the second part of the code where we need to divide this count by the total count to get % rate?
Thanks,
Yev
Thank you Jihwan! I did not run your method, but after learning more about my issue it looks like it would have worked as well.
Something like...
Quoted hit =
VAR _QuoteStatus = CALCULATE(COUNTROWS(Table), Table[Status] IN (....))
VAR _HitStatus = CALCULATE(COUNTROWS(Table), Table[Status] IN (....))
VAR _AllStatus = CALCULATE(COUNTROWS(Table), REMOVEFILTERS(Table[Status]))
RETURN
DIVIDE(_QuoteStatus, _HitStatus)
* Note: I'm not using _AllStatus in the result. Trying to remember my school days Maths but I think it cancels out. If that's not right you can add a couple of extra steps to DIVIDE(_QuoteStatus, _AllStatus) & DIVIDE(_HitStatus, _AllStatus)
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 |
---|---|
25 | |
16 | |
15 | |
7 | |
7 |
User | Count |
---|---|
35 | |
31 | |
16 | |
16 | |
12 |