Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear all,
Hope you are all well in this hard times.
I came accross a task which I dont seem to find a solution (maybe is because I am narrowing and focusing to much over the same thing) but i need your help.
The main goal is to have a card or cluster grapg showing the percentage of the total. Let me explain:
My data looks something like this:
Month | Country | Client | Logistic |
Jan | DE | A1 | Distributed |
Jan | DE | A1 | Distributed |
Jan | DE | A1 | Distributed |
Jan | DE | A1 | Distributed |
Jan | DE | A1 | Distributed |
Jan | DE | A1 | Received |
Jan | DE | A1 | Received |
Jan | DE | A1 | Received |
Jan | DE | A1 | NotReceived |
Jan | DE | A1 | NotReceived |
Feb | DE | A1 | Distributed |
Feb | DE | A1 | Distributed |
Feb | DE | A1 | Distributed |
Feb | DE | A1 | Distributed |
Feb | DE | A1 | Distributed |
Feb | DE | A1 | Received |
Feb | DE | A1 | Received |
Feb | DE | A1 | Received |
Feb | DE | A1 | Received |
Feb | DE | A1 | NotReceived |
I have various months, customers and countries.
The process flow is that every product is first DISTRIBUTED and then it can be RECEIVED or NOTRECEIVED by the client ( TOTAL Distributed = RECEIVED+NOTRECEIVED).
What i want to extract (and show thru visualizations) is the percentage of RECEIVED or NOTRECEIVED from DISTRIBUTED per each month.
The visualization will look like a cluster graph spread per month and in each month you will see the % of each or the two variables (RECEIVED and NOTRECEIVED) along with a slicer per customer.
Now, I assume a have to create a calculated column using DAX to SUM(DISTRIBUTED) and divide RECEIVED and NOT RECEIVED but i dont know how to write it properly.
My level in pbi is novice and I kindly need your help in order to get out of this tunnel vision I have.
thank you and stay safe.
Solved! Go to Solution.
@Anonymous , I said for Measure, You are creating a column.
Try a new measure like
divide(
calculate(countrows(filter(table[Logistic]<>"Distributed"))),
calculate(countrows(filter(table[Logistic]="Distributed")))
)
Thank you, I get: Too few arguments were passed to the FILTER function. The minimum argument count for the function is 2. 😞
@Anonymous , try like
divide(
calculate(countrows(filter(table,table[Logistic]<>"Distributed"))),
calculate(countrows(filter(table,table[Logistic]="Distributed")))
)
@Anonymous , I said for Measure, You are creating a column.
Hi @Anonymous
The measure will look something like.
Measure =
DIVIDE(
CALCULATE(
COUNTROWS( 'Table' ),
'Table'[Logistic] = "Distributed"
),
CALCULATE(
COUNTROWS( 'Table' ),
'Table'[Logistic] IN { "NotReceived", "Received" }
)
)
Thank you @Mariusz ,
The provided calculation returns a column filled with "1" (or100% if I formate it to %).
is this correct?
Hi @Anonymous
The sample that you provided returns 5 records for "Distributed" and 5 records between
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |