The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
taking in consideration just one column in my db, composed by standard names (es: dept1, dept2, dept3, dept1, dept1, dept3) repeated several times in the column, I would like to display the percentage of one of them compared to the total amount of them (ex: the percentage of dept1 in the test reported above is 50%).
M_SumRCAOwn =
CALCULATE(
DIVIDE(COUNT(RootCauses[DEPTID]), COUNT(RootCauses[DEPTID])))
Solved! Go to Solution.
Hi @IlMoro
Try this:
Measure =
VAR _A =
CALCULATE(
COUNTA( 'Table'[names] ),
FILTER( ALL( 'Table' ), 'Table'[names] = "dept1" )
)
VAR _B =
CALCULATE( COUNTA( 'Table'[names] ), ALL( 'Table' ) )
RETURN
_A / _B
Outpur:
Data I used:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @IlMoro,
Did VahidDM 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements.
If that also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @IlMoro
Try this:
Measure =
VAR _A =
CALCULATE(
COUNTA( 'Table'[names] ),
FILTER( ALL( 'Table' ), 'Table'[names] = "dept1" )
)
VAR _B =
CALCULATE( COUNTA( 'Table'[names] ), ALL( 'Table' ) )
RETURN
_A / _B
Outpur:
Data I used:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi VahidDM,
Great work! I need some clarification, your measure display the value of "dept1" only. I know we can write different measure for other department.
My Query is can we display the result all dept on single measure. can we achieved this or Is there any other method.
Thank in advance.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |