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
powerbi_seek
Frequent Visitor

Power BI - Variation of value by month

Hello guys,

 

I need your help please.

 

I have a Datetime table (full calendar), and another table related to it, with appointment data.

 

I need to show the variatiion of number of appoitments by Month, in a WaterFall chart.

 

Actually, I have a filter on a customer, who had only 2 records on October in whole 2017.

So normally, the variation in October should be +2, and in November -2, December 0.

 

Unfortunatly, it's not what I have, I got only +2 in october, and that's it.

 

So this is the formulas of my measure:

DIFF_RDV_byMONTH:=-(calculate(sum(Interaction[NbRDVbyRow]); PARALLELPERIOD(DateDim[Date];-1;MONTH))+calculate(sum(Interaction[NbRDVbyRow])))

Thanks for your help.

 

regards

1 ACCEPTED SOLUTION
spuder
Resolver IV
Resolver IV

Hi @powerbi_seek

I tried to rebuilt your issue and for me it seems to work. 

2 things. Change both operators and (just for optic) use PREVIOUSMONTH() instead

=CALCULATE(SUM(factAppointments[Appointments]))-CALCULATE(SUM(factAppointments[Appointments]);PREVIOUSMONTH(Kalender[Date]))

 

But I also tried it with Parallelperiod() and it worked as well.

 

 

 

View solution in original post

6 REPLIES 6
spuder
Resolver IV
Resolver IV

Hi @powerbi_seek

I tried to rebuilt your issue and for me it seems to work. 

2 things. Change both operators and (just for optic) use PREVIOUSMONTH() instead

=CALCULATE(SUM(factAppointments[Appointments]))-CALCULATE(SUM(factAppointments[Appointments]);PREVIOUSMONTH(Kalender[Date]))

 

But I also tried it with Parallelperiod() and it worked as well.

 

 

 

Can you please show a visual ?

@powerbi_seek 

 

looks like this

 

 

visual.png

I got it, my issue is related to January. I made an IF statement to do that only if the month is not January. And that seems not working

I think this should work as well. The whole calculation should be surounded by a CALCULATE() that has a filter condition "not January"

CALCULATE([Total Appointments]-CALCULATE([Total Appointments];PREVIOUSMONTH(DateTable[Date]));DateTable[Date].[Monat]<>"Januar")

Hi, that's it what I did, but didn't work, till I also filtered on Non Blank date field. Thanks anyway, it's working .

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.