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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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