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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.