The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to calculate the percentage of customers that fall into a specific rank. I want to show what % of customers are in each DIA Rank (High, Medium, Low). For example, 23.34% of customers have DIA Rank of "High". My sample data is listed below.
Table Name = DIA May and June
Customer | DIA Rank |
ABC Store | High |
Supermart | Medium |
Tech Center Pro | Low |
Super Center | Low |
Home Goods | Medium |
Target | High |
Solved! Go to Solution.
Hi @aafflick
Try this measure:
Measure 2 =
VAR _count =
CALCULATE (
COUNT ( 'DIA May and June'[Customer] ),
ALLEXCEPT ( 'DIA May and June', 'DIA May and June'[DIA Rank] )
)
VAR total =
CALCULATE ( COUNTROWS ( ALL ( 'DIA May and June' ) ) )
RETURN
DIVIDE ( _count, total )
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aafflick
Try this measure:
Measure 2 =
VAR _count =
CALCULATE (
COUNT ( 'DIA May and June'[Customer] ),
ALLEXCEPT ( 'DIA May and June', 'DIA May and June'[DIA Rank] )
)
VAR total =
CALCULATE ( COUNTROWS ( ALL ( 'DIA May and June' ) ) )
RETURN
DIVIDE ( _count, total )
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This worked perfectly! Now, how to I add a filter to the measure to only include data where (DIA May and June) [DIA % Change] is equal to or less than -.20?
@aafflick try this measure
Base Measure = COUNTROWS ( Table )
% Count = DIVIDE ( [Base Measure], CALCULATE ( [Base Measure], ALLSELECTED ( Table ) ) )
In a visual, put DIA Rank and above measure, and you will get the %, Make sure to change the format of above measure to % on measure tools menu.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.