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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
LiamPriestmanHH
Frequent Visitor

Re-occurring filter issue after publishing

Hi,

A few hours or days after publishing the filters which I have writtin into the DAX measure on my visuals stop working. For example:

 

 
Spoiler
Cost Avoidance Spend =
SWITCH(SELECTEDVALUE('Current'[Currency]),
"USD",SUMX(FILTER(MI_Data,MI_Data[Ebit?]="Non-Ebit"),MI_Data[Invoice USD]),
"Euro",SUMX(FILTER(MI_Data,MI_Data[Ebit?]="Non-Ebit"),MI_Data[Invoice (EUR)]),
"Local",SUMX(FILTER(MI_Data,MI_Data[Ebit?]="Non-Ebit"),MI_Data[Invoice]))
 
This measure calculates the sum of all invoices when filtering another column for the word "Non-Ebit". When I initially upload it works fine, but later on it will suddenly ignore the condition I have set and show me the total value of all invoices.
 
This seems like a bug in Power BI to me, but I wondered if anyone else had seen it before and found a way around it?
1 ACCEPTED SOLUTION

Hi,

Thank you for the response, my solution ended up being to add a calculated column to the MI_Data table which returns a numeric value based on the [Ebit?] column and filter the measure based on the calculated column instead.

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @LiamPriestmanHH ,

Try to add ALL function in the filter like this:

Cost Avoidance Spend =
SWITCH (
    SELECTEDVALUE ( 'Current'[Currency] ),
    "USD",
        SUMX (
            FILTER ( ALL ( MI_Data ), MI_Data[Ebit?] = "Non-Ebit" ),
            MI_Data[Invoice USD]
        ),
    "Euro",
        SUMX (
            FILTER ( ALL ( MI_Data ), MI_Data[Ebit?] = "Non-Ebit" ),
            MI_Data[Invoice (EUR)]
        ),
    "Local",
        SUMX (
            FILTER ( ALL ( MI_Data ), MI_Data[Ebit?] = "Non-Ebit" ),
            MI_Data[Invoice]
        )
)

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Thank you for the response, my solution ended up being to add a calculated column to the MI_Data table which returns a numeric value based on the [Ebit?] column and filter the measure based on the calculated column instead.

Hi @LiamPriestmanHH ,

Glad your problem has been solved! If you don't have other problems, would you mind accept your reply as solution? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

 

Best Regards,
Community Support Team _ kalyj

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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