cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
reddy421 Frequent Visitor
Frequent Visitor

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
rajendran Super Contributor
Super Contributor

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

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

 

Thanks

Raj

reddy421 Frequent Visitor
Frequent Visitor

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

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors