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
moltra
Helper IV
Helper IV

best practice for visuals Prior period, Current period and Year to date measures

I have 3 visuals in a report that I am working on that uses the same data field.  I am wondering what is the best practice or standard way to do it.

 

should I do 3 seperate measures with the filtering in the actual measure, or should I do 1 measure and use the Filters to get the desired time periods per visual?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@moltra 

You can only create 3 measures for the 3 visuals. You cannot filter 1 measure to display 3 outputs since they are using the same date column.

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@moltra 

You can only create 3 measures for the 3 visuals. You cannot filter 1 measure to display 3 outputs since they are using the same date column.

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@moltra , Best is to use time intelligence and date table

 

 

measure  = SUM(Sales[Sales Amount])

MTD Sales = CALCULATE([measure],DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([measure],DATESMTD(dateadd('Date'[Date],-1,MONTH)))

 

YTD Sales = CALCULATE([measure],DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE([measure],DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

 

if you want to reduce the measures use calculation groups

Calculation groups
https://docs.microsoft.com/en-us/analysis-services/tabular-models/calculation-groups?view=asallprodu...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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