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.
Good day,
I need to add a column to show the Total Credit Invoices percentage for each name by zone. For example, the first row of the new column would display 12.5% (Alice had 2 of the 16 credit invoices from zone A). There is a slicer for Zone and Date.
Here is a link to a .pbix file: https://1drv.ms/u/s!Agkx6hQs0NiX1BHLXrIY5klP-GIy?e=ASjIXM. I thought it would be easier to provide this than to clutter the post with tables and models. In a nutshell, I am simply counting the rows of the Sales Invoices table to determine the # of invoices: Total Invoices = COUNTROWS( 'Sales Invoices' ). Then I am filtering using the Invoice Type column to determine the number of credit invoices: Total Credit Invoices = CALCULATE( [Total Invoices], 'Sales Invoices'[Invoice Type] = "C" ). Now to calculate the percentages as described above has become a gate.
I'm grateful for the time and effort expended by the people on this forum.
Regards,
Bob
Hi, @bob57 , you may want to try this measure
% of Total Credit Invoices =
DIVIDE (
[Total Credit Invoices],
CALCULATE (
[Total Credit Invoices],
ALLEXCEPT ( 'Sales Invoices', Zones[Zone] )
)
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thank you! That did the trick and it makes perfect sense,
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |