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 have a table featuring data similar to the sample data in screenshot below. I am wondering if it is possible to create a measure that will display the percentage of total dollars in each Category (A or B), i.e. for Bob the goal would be to see that 73.97% of his pay was in category A (2541/3435 * 100).
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Expected result measure: =
VAR _pay =
SUM ( Sales[Pay] )
VAR _totalpay =
CALCULATE ( SUM ( Sales[Pay] ), ALL ( Category[Category] ) )
RETURN
DIVIDE ( _pay, _totalpay )
Hi,
Please check the below picture and the attached pbix file.
Expected result measure: =
VAR _pay =
SUM ( Sales[Pay] )
VAR _totalpay =
CALCULATE ( SUM ( Sales[Pay] ), ALL ( Category[Category] ) )
RETURN
DIVIDE ( _pay, _totalpay )
Thank you! I was able to get this to work on my file with the real business information on it. However, I was able to make it to work without splitting up the table into many separate ones like you show in your relationship diagram. Is there any reason you chose to do that?
Hi,
Thank you for your message. I tried to create a "Star Schema Data model" in Power BI.
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |