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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
lukynavy
New Member

Compare non consecutive period data

Hi,

I have this situation:

1.JPG

 

I use the following expression to calculate Anno Corr (max year) and Anno Prec  (min year)

Anno Prec = CALCULATE(sum(Fatturato[€]);FILTER(all(Fatturato[DataComp].[year]);Fatturato[DataComp].[year]= MIN(Fatturato[Anno])))

Anno Corr = CALCULATE(sum(Fatturato[€]);FILTER(Fatturato;Fatturato[DataComp].[year]=MAX(Fatturato[year])))

 

the problem is that if there is some row with blank value since that value wasn't quotated that year, I got the same value of the other year

 

For example 2013 - Genuary - Incoming = 1000 and 2015 - Genuary I don't have any incoming, I got 1000 as well for 2015 even if it should be 0 or blank

 

 

 

1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @lukynavy,

You create a calculated column or measure? You should create a measure, so it will return null when that value wasn't quotated that year.

If this doesn't solve your issue. Could you please share your .pbix file for further analysis? In your screenshot, I am can't see 2013 and 2015 year. 

Best Regards,
Angelia

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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