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

Calculating periods

Ciao friends

I have a (simple) problem with Power BI. When I want to write predefined period measure, the calculation returns value that I'm looking for but for all of the periods. 

Here is the break down of the result (how it should look like)

bumoverflow_0-1685002183011.png

 

And this is the result

bumoverflow_1-1685001992573.png

I wrote this using calcution groups, but even when I used measure intead the same error occured

bumoverflow_2-1685002034744.png

 

As you can see I even hardcoded date to be 100% sure that the filter is working correctly.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bumoverflow , Please add a month year column in you calendar

 

Month Year = format([Date], "YYYY-MM")

 

A measure like this

calculate(selectedmeasure(), filter(calendar, calendar[Date] >=date(2023,04,01) ) )

 

 

calculate(selectedmeasure(), filter(calendar, calendar[Date] >eomonth(today(),-2) ) )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@bumoverflow , Please add a month year column in you calendar

 

Month Year = format([Date], "YYYY-MM")

 

A measure like this

calculate(selectedmeasure(), filter(calendar, calendar[Date] >=date(2023,04,01) ) )

 

 

calculate(selectedmeasure(), filter(calendar, calendar[Date] >eomonth(today(),-2) ) )

Thanks a lot! It worked 😄

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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