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
reddy421
Helper I
Helper I

WTD, MTD sales are not showing always and they are changing based on the date slicer.

Hi,

I have a dashboard where I am displaying the sales of this week, Month and yearly along with the other things based on the Dateslicer.

So this Week, Month and Year sales should be independent on the Dateslicer.

I created new measures for MTD and YTD using the functions available.

But for WTD, I have to create a week number column in week dimension and then create a new measure after that.

Below are the calculations I used.

 

WeekNum = WEEKNUM(Dim_Date[Calendar_Date],1)

WTD Total = CALCULATE(SUM(v_FactDailySalesWithLowestPriorityRecord[Net Sales USD]),FILTER(Dim_Date,YEAR(Dim_Date[Calendar_Date]) = YEAR(NOW()) && WEEKNUM(NOW())=Dim_Date[WeekNum]))

 

I am getting the WeelyRev sales sometimes and not always( it is varying based on the data slicer I select)


Good:

2018-06-26 09_47_03-Dashboard_20180625_1 - Power BI Desktop.png

Bad:
2018-06-26 09_54_30-Dashboard_20180625_1 - Power BI Desktop.png2018-06-26 09_53_19-Dashboard_20180625_1 - Power BI Desktop.png2018-06-26 09_52_24-Dashboard_20180625_1 - Power BI Desktop.png

 

1) Can you help me in getting the WTD, MTD and YTD sales always?
2) Also Is there a way I can make some part of my dashboard independent on the slicer filters?

 

Thank you.

2 REPLIES 2
Anonymous
Not applicable

Yes. You can. use ALL () function to override the Slicer filters.

 

Thanks

Raj

Thank you for the reply Rajendran.

I am still getting an error for Monthly and Yearly Revenues If I slice my date to get the sales for next one month or year.

FYI...

I used the below formula for MTD 

MTD = CALCULATE(SUM(v_FactDailySalesWithLowestPriorityRecord[Net Sales USD]),ALL(Dim_Date),DATESMTD(Dim_Date[Calendar_Date]))

or 

MTD Total = TOTALMTD(SUM(v_FactDailySalesWithLowestPriorityRecord[Net Sales USD]),Dim_Date[Calendar_Date])

 

2018-06-26 11_58_28-Dashboard_20180625_1 - Power BI Desktop.png2018-06-26 11_57_19-Dashboard_20180625_1 - Power BI Desktop.png

 

 

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.