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.
Hi Power BI Community,
I need to show a line chart with the y -axis in percent and x - axis days
My first quastion: How can I make the delivery days from 0 to ten days on the x - axis?
Second and bigger quastion: I want a cumilated line chart that shows when all is delivered = 100 % like this for example but with days not units:
Thank you for your time!
Solved! Go to Solution.
Hi @Anonymous ,
According to my understanding, you want to set 0-5,5-15,15-30,30-45... as X-axis ,the sum of percentage as Y-axis, and the cumulative percentage over date as the secondary Y-axis, right?
You could add Rank column and then switch it to create the Units column for X-axis like this:
Rank =
RANKX ( 'Table', [Date],, ASC, DENSE )
Units =
IF (
[Rank] >= 1
&& [Rank] < 5,
"0-5",
IF (
[Rank] >= 5
&& [Rank] < 15,
"5-15",
IF (
[Rank] >= 15
&& [Rank] < 30,
"15-30",
IF ( [Rank] >= 30 && [Rank] < 45, "30-45" )
)
)
)
Here is my table output:
Then use the following formula to calculate the cumulative percentage:
Measure =
CALCULATE (
SUM ( 'Table'[Percentage] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
)
In addition, in order for the x-axis to be displayed in the correct order, put the Rank to Tooltip pane.
The final output is shown below:
Please kindly take a look at the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to my understanding, you want to set 0-5,5-15,15-30,30-45... as X-axis ,the sum of percentage as Y-axis, and the cumulative percentage over date as the secondary Y-axis, right?
You could add Rank column and then switch it to create the Units column for X-axis like this:
Rank =
RANKX ( 'Table', [Date],, ASC, DENSE )
Units =
IF (
[Rank] >= 1
&& [Rank] < 5,
"0-5",
IF (
[Rank] >= 5
&& [Rank] < 15,
"5-15",
IF (
[Rank] >= 15
&& [Rank] < 30,
"15-30",
IF ( [Rank] >= 30 && [Rank] < 45, "30-45" )
)
)
)
Here is my table output:
Then use the following formula to calculate the cumulative percentage:
Measure =
CALCULATE (
SUM ( 'Table'[Percentage] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
)
In addition, in order for the x-axis to be displayed in the correct order, put the Rank to Tooltip pane.
The final output is shown below:
Please kindly take a look at the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , if day is a column then you can create a static bucket. If measure then you need to do dynamic Segmentation
For % of Cumm total, you have try a measure
divide(calculate([Gt count], filter(allselected(Table), Table[days] <= max(Table[days] ))), calculate([Gt count], allselected(Table)))
segmentation
https://www.youtube.com/watch?v=CuczXPj0N-k
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
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 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |