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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Good afternoon! I use the formula to get the difference between the current quarter and the last
TOTALQTD(SUM('Свод 21'[Количество изделий всего,шт]),'Свод 21'[Датавыдачи])-CALCULATE(TOTALQTD(SUM('Свод 21'[Количество изделий всего,шт]),'Свод 21'[Датавыдачи]),DATEADD('календарь'[Date],-1,QUARTER))
discovered that the formula in the 1st quarter subtracts from the 4th quarter of the same year, help me figure out if it is possible to set the conditions under which it will give out 0 if it is 1 quarter?
Solved! Go to Solution.
Hi @DeEviloN ,
Please check you data model. Here I create a sample to have a test.
Summary 21:
calendar:
calendar =
ADDCOLUMNS (
CALENDARAUTO (),
"Year", YEAR ( [Date] ),
"Qtr",
"Qtr" & " "
& QUARTER ( [Date] )
)
Relationship:
You can try this measure to get result.
Diff between Current Qtr and Last Qtr =
VAR _SUMMARIZE =
SUMMARIZE (
'calendar',
'calendar'[Qtr],
"DIFF",
VAR _DIFF =
TOTALQTD ( SUM ( 'Summary 21'[Number of items total,pcs] ), 'Summary 21'[Date] )
- CALCULATE (
TOTALQTD ( SUM ( 'Summary 21'[Number of items total,pcs] ), 'Summary 21'[Date] ),
DATEADD ( 'calendar'[Date], -1, QUARTER )
)
RETURN
IF ( 'calendar'[Qtr] = "Qtr 1", 0, _DIFF )
)
RETURN
SUMX ( _SUMMARIZE, [DIFF] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DeEviloN ,
Please check you data model. Here I create a sample to have a test.
Summary 21:
calendar:
calendar =
ADDCOLUMNS (
CALENDARAUTO (),
"Year", YEAR ( [Date] ),
"Qtr",
"Qtr" & " "
& QUARTER ( [Date] )
)
Relationship:
You can try this measure to get result.
Diff between Current Qtr and Last Qtr =
VAR _SUMMARIZE =
SUMMARIZE (
'calendar',
'calendar'[Qtr],
"DIFF",
VAR _DIFF =
TOTALQTD ( SUM ( 'Summary 21'[Number of items total,pcs] ), 'Summary 21'[Date] )
- CALCULATE (
TOTALQTD ( SUM ( 'Summary 21'[Number of items total,pcs] ), 'Summary 21'[Date] ),
DATEADD ( 'calendar'[Date], -1, QUARTER )
)
RETURN
IF ( 'calendar'[Qtr] = "Qtr 1", 0, _DIFF )
)
RETURN
SUMX ( _SUMMARIZE, [DIFF] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 136 | |
| 110 | |
| 50 | |
| 32 | |
| 29 |