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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mukhan169
Helper III
Helper III

Dax Adding filter to the measure

Good morning experts,

I have a table with field MISGroup that contains 0,3,12 or 24 in it.

For the following measure, how do I just add "where MISGroup=3" 

 

IPTV =
IF(ISBLANK([Total By MIS]) && [Sum of Sales]>0 && table[MISGroup]=3 |
0
|Divide([Running Total By MIS]|[Sum of Sales]|0)*1000
)

 

9 REPLIES 9
parry2k
Super User
Super User

@mukhan169 something like this

 

Sum Sales = CALCULATE( SUM(Table[Sales]), Table[MISGroup]=3)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thank you but

Only add 0 for MISGroup =3. Otherwise dont. So this one wont work.

Thanks for your reply

@mukhan169 try this

 

Sum Sales = 
VAR s = CALCULATE( SUM(Table[Sales]), Table[MISGroup]<>3)
RETURN
IF( ISBLANK(s), 0, s )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k  thank you again.

I just tried this 

IPTV Test = CALCULATE(TRUE()|Claims[MISGroup]=3)
so I can later check for true or false in my if condition.
It produces that result. I know I am missing something very basic. it should be false for 12. again greatly appriciate your help.IPTVTest.PNG

@mukhan169 to be very honest, without looking at sample data it is very hard to provide the solution. If you can share sample data in excel will help a lot. It will save both of our time.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

I have sample data file loaded here

https://community.powerbi.com/t5/Desktop/Cumulative-Total-per-group-and-month-which-fill-the-missing...

this is a very smart part of a bigger problem I am trying to solve.

its a chart for 3,12 and 24 MIS which are not supposed to cross over each other. I only want to apply formula for 3 mis group for now.

Hi @mukhan169 

You may add formula ...&&MAX(Claims[MISGroup])=3.Test it with your sample file as below.

1.png

Regards,

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-cherch-msft 
Thank  you but it still doesnt work, its showing nothing for MIS where the count is zero. I am baffeled . But appriciate your help.

3MIS.PNG

Hi @mukhan169 

Could you show us your measure and provide a  clear illustrative example about your expected output?

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.