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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

selecting range date where measure is different from date to date is not summing up values

Hello everyone

table.png


i have 2 formulas inside my measure

old way = SUM(RevenueTable[Total])

this was the formula from beginning of my dataset until october 3 2022

so on october 3 2022 and forth, 
new formula = SUMX(Revenuetable2,[QTTY] * [Amount])



so my measure is 
total revenue = 

VAR oldway = IF(MAXX(ALLSELECTED('Calendar Table'),'Calendar Table'[Date]) < DATE(2022,10,3) ,SUM(RevenueTable[Total]),0)
VAR newway = IF(MAXX(ALLSELECTED('Calendar Table'),'Calendar Table'[Date]) >= DATE(2022,10,3) ,SUMX(Revenuetable,[QTTY] * [Amount]),0)
VAR revenue =
oldway + newway


it work fine on single selected date 

but if i selected from september 26 to october 9, 
it wont give me the sum of both


if selected october 3 and above, it gave me new correct:

 

new.png


if selected september 26 till october 2 give me old corrrect :

old.png


now if i select all, it gives me this:

Screenshot 2022-10-14 031641.png


as you see it wont give me the sum it just gives me the new formula is apllied


please help


1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like , Unsing filter add both

 

calculate(SUM(RevenueTable[Total]),Filter('Calendar Table','Calendar Table'[Date] < DATE(2022,10,3) )) +

calculate(SUMX(Revenuetable,[QTTY] * [Amount]),Filter('Calendar Table','Calendar Table'[Date] >=  DATE(2022,10,3) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a measure like , Unsing filter add both

 

calculate(SUM(RevenueTable[Total]),Filter('Calendar Table','Calendar Table'[Date] < DATE(2022,10,3) )) +

calculate(SUMX(Revenuetable,[QTTY] * [Amount]),Filter('Calendar Table','Calendar Table'[Date] >=  DATE(2022,10,3) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.