Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am tring to create a Line and Column Clustered Chart as part of it. I have the Variable dates as X-AXIS (such as days in month or sundays in a year, last 13 weeks etc.. as dates). Y-AXIS has SalesAmount. Now as you can see the dates are 01/01, 01/02, 01/06 etc.. I need to get the difference in the bars displayed as line for example value to be displayed on 01/01 need to be zero but value to be displayed on 01/02 should be as below
=(BarValue of 01/02 - BarValueof 01/01)/BarValue of 01/01 * 100 as percentage. I am having really tough time to calculate this as moving percentage change and dispaly it as line. Any help would be greatly appreciated.
Solved! Go to Solution.
Hi @Ravikjinfo,
Try the mesure below please. Please also check out the demo in the attachment.
Measure =
VAR minimumDay =
CALCULATE ( MIN ( 'Table1'[Date] ), ALL ( 'Table1' ) )
VAR lastday =
CALCULATE (
MAX ( 'Table1'[Date] ),
FILTER ( ALL ( 'Table1' ), 'Table1'[Date] < MIN ( 'Table1'[Date] ) )
)
VAR lastTotal =
CALCULATE (
SUM ( 'Table1'[Value] ),
FILTER ( ALL ( 'Table1' ), Table1[Date] = lastday )
)
RETURN
IF (
MIN ( 'Table1'[Date] ) = minimumDay,
0,
DIVIDE ( SUM ( Table1[Value] ) - lastTotal, lastTotal )
)
Best Regards,
Dale
Hi @Ravikjinfo,
Try the mesure below please. Please also check out the demo in the attachment.
Measure =
VAR minimumDay =
CALCULATE ( MIN ( 'Table1'[Date] ), ALL ( 'Table1' ) )
VAR lastday =
CALCULATE (
MAX ( 'Table1'[Date] ),
FILTER ( ALL ( 'Table1' ), 'Table1'[Date] < MIN ( 'Table1'[Date] ) )
)
VAR lastTotal =
CALCULATE (
SUM ( 'Table1'[Value] ),
FILTER ( ALL ( 'Table1' ), Table1[Date] = lastday )
)
RETURN
IF (
MIN ( 'Table1'[Date] ) = minimumDay,
0,
DIVIDE ( SUM ( Table1[Value] ) - lastTotal, lastTotal )
)
Best Regards,
Dale
Thank you, It Worked.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 35 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |