Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Santhosh0579
Frequent Visitor

Need Help to fix the total value for 30 rolling days and 90 rolling days issue

 

 

Need Help to fix the total value for 30 rolling days and 90 rolling days issue (Input date from Date slicer)

 

Santhosh0579_0-1678793388970.png

 

Formula :

Totallogin = var t=SUMMARIZE('userloggedinacc','userloggedinacc'[CountryCode],"UserDistinct",DISTINCTCOUNT(userloggedinacc[UserID] ))return SUMX(t,[UserDistinct])


30-Days Rolling = CALCULATE([Totallogin],DATESINPERIOD(dimdate[CalendarDate],MAX(userloggedinacc[LoggedInOn]),-30,DAY))

90-Days Rolling = CALCULATE([Totallogin],DATESINPERIOD(dimdate[CalendarDate],MAX(userloggedinacc[LoggedInOn]),-90,DAY))

 

I will appriciate any advice how to accomplish that. 

5 REPLIES 5
Santhosh0579
Frequent Visitor

Guys,

Thank you so much for your support, Have modified the below Dax formula

and it is working as expected both Matrix and cluster columnchart.

 

Formula :

Totallogin = var t=SUMMARIZE('userloggedinacc','userloggedinacc'[CountryCode],"UserDistinct",DISTINCTCOUNT(userloggedinacc[UserID] ))return SUMX(t,[UserDistinct])


30-Days Rolling = CALCULATE([Totallogin],
Filter (ALL(dimdate),
dimdate[CalendarDate] > MAX(dimdate[CalendarDate])-30 &&
dimdate[CalendarDate] <= MAX(dimdate[CalendarDate])
))

90-Days Rolling = CALCULATE([Totallogin],
Filter (ALL(dimdate),
dimdate[CalendarDate] > MAX(dimdate[CalendarDate])-90 &&
dimdate[CalendarDate] <= MAX(dimdate[CalendarDate])
))

 

Santhosh0579_0-1678805442374.png

 

Santhosh0579_1-1678805490188.png

 

aditya0125
Resolver I
Resolver I

Did you check relationship between the tables.

 

Hi Aditya,

Yes relationship is there with bussinesskey

 

Santhosh0579_0-1678796779743.png

 

okay, try to enble cross filter(Both), bcoz the dax you wrote is perfectly okay(jst check summerize dax again).

Santhosh0579
Frequent Visitor

Hello Team, 

Is someone able to help to fix this DAX Formula?

Thank you inadvance

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.