Forum Discussion
numerator and denominator
Hello All,
In a table "DH001" , I have a Column called "MName".
Values in the column are as:
Column: "MName"
------- Human_Visit
------- BOT_Visit
-------Standard_Request_Caching
-------Total Request
I want to calculate % as below:
Standard_Request_Caching/Total Request
Help will be appreciated. Thanks
Hi sdhn ,
Then modify the DAX as follows:
prop = var t1 = CALCULATE(SUM(DH001[MValue]), DH001[MName] = "Standard_Request_Caching") var t2 = CALCULATE(SUM(DH001[MValue]), DH001[MName] = "Total Request") RETURN t1/t2Thanks,
Pragati
4 Replies
- AnonymousNot applicable
can you show a screenshot of the column?
- Pragati11
Super User
Hi sdhn ,
If I understand correctly - "you want proportions based on the count".
You can write a simple DAX measure as follows:
prop = var t1 = CALCULATE(COUNT(DH001[MName]), DH001[MName] = "Standard_Request_Caching") var t2 = CALCULATE(COUNT(DH001[MName]), DH001[MName] = "Total Request") RETURN t1/t2Then convert this measure to a "percentage" using following option in Power BI from top ribbon:
Click on your measure, then on the top ribbon choose "%" icon.
Thanks,
Pragati
- sdhn
Responsive Resident
Actually i have already counts in other column as:
Column: "MName", --------------- "MValue"
------- Human_Visit,----------------345000
------- BOT_Visit,-------------------12000
-------Standard_Request_Caching, 4500
-------Total Request ,---------------4000