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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kimrhansen
Frequent Visitor

Create measure that holds previous month value as calculated from Sliced filtered month

Hi all,

 

I am going nuts here, and I have not been able to find the correct solution

 

I want to do the following.

 

Create a measure with the previous month BESTPRM. 

That way I can compare BESTPRM with BESTPRM Prev.

However, if I only select one month in my slicer, than I have nothing in my BESTPRM Prev value.

Therefore I try to remove the filter with the ALL function using the measure below.

However, this results in my measure including all prevous dates values. Thus the BESTPRM Prev measure is to large.

I just want the value one month prior to the selected one in my slicer.

 

BESTPRM Prev = CALCULATE(SUM('Fact_table'[BESTPRM]);FILTER(all('dim Date');'dim Date'[Date]>=EOMONTH('dim Date'[Date];-1)))

 

Thanks in advance,

 

Kim

1 REPLY 1
spuder
Resolver IV
Resolver IV

Hi @kimrhansen

 

I tried to rebuild your problem. The result is as follows.

 

example.jpg

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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