Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
Was hoping someone could help me out here. Assuming i have the following data in sheet1:
Vendor | Id | items | Valid | Reason |
Ven1 | 1 | 1 | Y | Reason1 |
Ven1 | 1 | 2 | Y | Reason1 |
Ven2 | 2 | 1 | N | Reason2 |
Ven3 | 3 | 1 | Y | Reason1 |
Ven3 | 3 | 2 | N | Reason2 |
Ven3 | 3 | 3 | N | Reason2 |
Ven4 | 4 | 1 | Y | Reason3 |
Ven4 | 4 | 2 | Y | Reason3 |
Ven4 | 5 | 1 | N | Reason2 |
Ven5 | 6 | 1 | N | Reason1 |
How would I create a measure that is the % of total based on items and validity?
For example if I have a pie chart displayed of all the reasons, and then I have a slicer for Valid and Vendor.
What I want to create is two number % visuals that will change based off of the slicers.
So for example if I click the slicer and I select Ven4 and click the other slicer and valid = Y, I want one % visual to display the count of ven4 items vs all so 30%(3/10). And the 2nd % visual I want to display % of valid only for ven4. So 66%(2/3). Sorry if this sounds confusing I will try to clarify if needed.
Thanks in advance!
Solved! Go to Solution.
@lasthero All these are MEASURES!
Transactions = COUNTROWS ('Table')
Transactions (Overall) = CALCULATE ( [Transactions], ALL('Table'))
Transactions (Overall by Vendor) = CALCULATE ( [Transactions], ALLEXCEPT('Table', 'Table'[Vendor]))
Transactions (Valid) = CALCULATE ( [Transactions], FILTER ( ALLSELECTED('Table'), 'Table'[Valid]="Y"))
MEASURE 1 = DIVIDE ( [Transactions (Overall by Vendor)], [Transactions (Overall)], 0 )
MEASURE 2 = DIVIDE ( [Transactions (Valid)], [Transactions (Overall by Vendor)], 0 )
I think this is what you are trying to do???
Hope this helps!
@lasthero All these are MEASURES!
Transactions = COUNTROWS ('Table')
Transactions (Overall) = CALCULATE ( [Transactions], ALL('Table'))
Transactions (Overall by Vendor) = CALCULATE ( [Transactions], ALLEXCEPT('Table', 'Table'[Vendor]))
Transactions (Valid) = CALCULATE ( [Transactions], FILTER ( ALLSELECTED('Table'), 'Table'[Valid]="Y"))
MEASURE 1 = DIVIDE ( [Transactions (Overall by Vendor)], [Transactions (Overall)], 0 )
MEASURE 2 = DIVIDE ( [Transactions (Valid)], [Transactions (Overall by Vendor)], 0 )
I think this is what you are trying to do???
Hope this helps!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
79 | |
58 | |
36 | |
35 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |