March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I posted this in another thread but highlighted the issue of it not plotting correctly on a line graph - however the issue actually is both of these calcutions ie
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR(all('Fiscal Date'[Date])))
PY 2 = CALCULATE([Revenue], PARALLELPERIOD(ALL('Fiscal Date'[Date]), -1, YEAR))
bring back exaclty the same data as this
Revenue = (CALCULATE(Sum(Registrations[MRR])) + CALCULATE(sum(Sales[RevenueNettAmount])))
what am i doing wrong, could this be a cross fact issue. I have 2 facts linking together through dimensions. However its only the date dimension that is the linking bit for these 2 which has a one to many relationship for each fact in a single direction.
Proud to be a Super User!
Remove the ALL function call inside the SAMEPERIODLASTYEAR and PARALLELPERIOD calls.
i had that previously but it brings back nothing - its because i have this filter on my dashboard
this is what i have changed to
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date]))
PY 2 = CALCULATE([Revenue], PARALLELPERIOD('Fiscal Date'[Date], -1, YEAR))
and as you can see now its empty when i change this, i am baffled...
Proud to be a Super User!
Does your 'Fiscal Date' have dates in it for the prior fiscal year(it must for time intelligence to work)? Is your 'Fiscal Date' calendar table related to the fact table via columns of type Date? if not, can you try this:
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date]), ALL('Fiscal Calendar') )
that definitely shifted something however my measures are behaving different, rushing off to a weekend away will figure it out monday, thanks for the help!
Proud to be a Super User!
@vanessafvg Is the issue solved now?
no 😞 trying a variety of things but its just not working - i really can't figure out what i am doing wrong, just throwing in things now to see what i might be doing wrong.
Revenue = (CALCULATE(Sum(Registrations[MRR])) + CALCULATE(sum(Sales[RevenueNettAmount]))) - this is the base calculation
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[TheDate].[Date]), ALL('Fiscal Date') )
PY 2 = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[TheDate].[Date]), 'Fiscal Date'[Calendar Year] )
PY 3 = CALCULATE([Revenue], PARALLELPERIOD(all('Fiscal Date'[TheDate].[Date]), -1, YEAR))
I do have a filter on the page which is only looking at the current fiscal year, but there is definitely data in my model that stretches back beyond the fiscal year which i thought the ALL would resolve. It does resolve it in PY Revenue however it doens't bring it back per day it just flat lines it in one aggregaton for all time.
Dont know if this makes sense?
Proud to be a Super User!
I remember this problem from your other thread. I think this must be related to the relationships you have set up.
Can you share the .pbix file (or en extract from it?). Without that it's hard to troubleshoot.
no unfortunately i can't. but i can tell you that i have 2 fact tables (if you look at the revenue measure its the combination of a measure from these 2 facts), both fact tables have a single many to one relationship with the date in fiscal date
Proud to be a Super User!
Are you able to get it working ok by using revenues from just one table?
For example:
Revenue = sum(Sales[RevenueNettAmount])
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[TheDate]))
Can you also post a screenshot of the Manage Relationships window?
now it brings back nothing 🙂 if i put all in, it just duplicated the revenue figure
Proud to be a Super User!
Hmm - ok, so the last thing I would check before giving up (!) is the date field.
Can you try creating a new date table. You could do a quick one by clicking on Modeling > New Table, then enter:
Calendar = CALENDAR (DATE(2010,1,1), DATE(2017,12,31))
Then create a relationship between this date field and your date field in the Sales table.
On a new page, drag this new Date field to a Table Visualization, and drag the Revenue and PY Revenue measures to the same table. Remove all filters.
Does that show anything for PY Revenue?
thanks
i added the table. I also removed all links to all other tables and only joined sales to the new calendar table.
Revenue = CALCULATE(sum(Sales[RevenueNettAmount]))
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Calendar'[Date]))
PY2 Revenue = CALCULATE([Revenue], PARALLELPERIOD('Calendar'[Date],-1,YEAR)) (gave the same results)
Proud to be a Super User!
thats a good point, ill give that a bash, i did post the manage relationships, in the last post.
Proud to be a Super User!
cant believe no one can help with these - anyone?
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |