Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
MrA15S
New Member

PARALLELPERIOD not working when the current amount equals £0.00

I have created 2 measures...

 

1) Current amount

 

GL Entry Amount = sum('037_MS_GL Data_Qlik'[GL Entry Amount])+0
 
2) Last year's amount
 
Last Year Amount = CALCULATE([GL Entry Amount],PARALLELPERIOD(Dates[Date],-12,MONTH))+0
 
When the GL Entry Amount equals £0.00 then the Last Year Amount automatically becomes £0.00 when it should actually have a value.
 
Is there any reason for this? When I filter on months where the GL Entry Amount doesn't equal £0.00 then the Last Year Amount measure works fine. Really strange!
 
Any help will be much appreciated.
1 ACCEPTED SOLUTION

Thank you very much for your help.

 

It seems like the issue was with my relationship too. The relationship between my 2 tables had a Cross filter direction = Both but when I changed it to Single, your solution worked.

 

Much apprecaited.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@MrA15S , for last year better you use Trailing measure

example

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

or sameperiodlast year

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

or measures like

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))

Thank you very much for your help.

 

It seems like the issue was with my relationship too. The relationship between my 2 tables had a Cross filter direction = Both but when I changed it to Single, your solution worked.

 

Much apprecaited.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.