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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ljcrwfr1
Frequent Visitor

Need help with trying to exclude certain data past a particular date

I have a data set of CPT Procedure codes and I am looking to get the sum of their units but I want to exclude codes that contain 0503 after July 1, 2023. 

 

I tried using a cobination of dax formulas and I tried this formula but I dont think I used it correctly.

Measure =
CALCULATE(SUM('Appended Raw Data'[chg units sum]),
KEEPFILTERS( NOT 'Appended Raw Data'[proccode] =0503), 'Calendar'[Date] < DATE(2023,7,1))
1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Super User
Super User

Hi @ljcrwfr1 

 

If you could provide sample data that would be more handy for solving the problem. Here is my solution 

you can try this measure:
CALCULATE( SUM('Appended Raw Data'[chg units sum]), FILTER( 'Appended Raw Data', LEFT('Appended Raw Data'[proccode], 4) <> "0503" || 'Calendar'[Date] <= DATE(2023, 7, 1) ) )

 

this should work

 

Did I answer your question? if not please more details about data and problem statment
Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


Regards

 

View solution in original post

2 REPLIES 2
qqqqqwwwweeerrr
Super User
Super User

Hi @ljcrwfr1 

 

If you could provide sample data that would be more handy for solving the problem. Here is my solution 

you can try this measure:
CALCULATE( SUM('Appended Raw Data'[chg units sum]), FILTER( 'Appended Raw Data', LEFT('Appended Raw Data'[proccode], 4) <> "0503" || 'Calendar'[Date] <= DATE(2023, 7, 1) ) )

 

this should work

 

Did I answer your question? if not please more details about data and problem statment
Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


Regards

 

This worked! Thanks a million

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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