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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply

DAX measure help ignore filter

Hallo

 

Hope someone can help me. I havde this measure:

 

venuemanager =
var endags = CALCULATE(SUM('Digital produkt status'[Antal]), FILTER('Alle produkter', 'Alle produkter'[Type]="endags"))

var partout = CALCULATE(
SUM('Digital produkt status'[Antal]), ALL('Alle produkter'[Dag]), FILTER('Alle produkter', 'Alle produkter'[Type]="partout")
)

return endags + partout
 
and it return:
 
 

image.png

 

But i want this output: If type = "Partout" then ignore the day filter called "Dag" but it dont work

 

 

image.png

 

Best regards Andreas Alleslev

8 REPLIES 8
jameszhang0805
Resolver IV
Resolver IV

Please try 

VAR endags =
CALCULATE (
    SUM ( 'Digital produkt status'[Antal] ),
    FILTER (
        'Alle produkter',
        'Alle produkter'[Type] = "endags"
    )
)
VAR partout =
CALCULATE (
    SUM ( 'Digital produkt status'[Antal] ),
    'Alle produkter'[Type] = "partout"
)

RETURN endags + partout

 

thank for your answar. it gives the same result

 

andreasalleslev_0-1613986383573.png

 

VAR endags =
CALCULATE (
    SUM ( 'Digital produkt status'[Antal] ),
    FILTER (
        'Alle produkter',
        'Alle produkter'[Type] = "endags"
    )
)
VAR partout =
CALCULATE (
    SUM ( 'Digital produkt status'[Antal] ),
    'Alle produkter'[Dag] = "partout"
)

RETURN endags + partout

Hmm, no is the same result. But i have tried, and now i get the correct answar but the result is in the wrong row?? the result for Partout must be in the row partout

 

andreasalleslev_0-1613989786080.png

 

rfigtree
Resolver III
Resolver III

does "dag" come from your calendar table, maybe you need to use filter(all(caledar, ...  in your calculate.

 

other wise try FILTER(allexcept('Alle produkter','Alle produkter'[Type]), 'Alle produkter'[Type]="partout") 

 

Nope, is come from the product table. the product table have af "Type" and af "Dag" collum. and when the "type" is "Partout" then ignore the "Dag" collum. 

other wise try FILTER(allexcept('Alle produkter','Alle produkter'[Type]), 'Alle produkter'[Type]="partout") 

Hmm, nope, is dosent work. it fails:

 

andreasalleslev_1-1613985296427.png

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors