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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gluizqueiroz
Resolver I
Resolver I

How to igore a column and filter by a value in that column that I ignored

I need to create a measure that returns the "Qty" from column "Total Sold" for the column "Full Paid", "Half Paid" and "Free", but I cannot ignore the slicers on the page or the Stores (on lines). I need to create something like the following measure, but it doensn't work by the way...

 

 

Measure that I need = 
CALCULATE(
    SUM(BI_Sales[Qty]); 
    FILTER(
        ALL(BI_Sales[Atribute]);
        BI_Sales[Atribute] = "Total Sold"
    )
)

 

 


Here a matrix for example:

image.png

Here a sample to create the previous matrix:

StoreAtributeQtyOrderAtribute
Store 1Total Sold1001
Store 1Half Paid403
Store 1Free104
Store 1Full Paid502
Store 2Total Sold2001
Store 2Half Paid803
Store 2Free204
Store 2Full Paid1002
Store 3Total Sold3001
Store 3Half Paid1203
Store 3Free304
Store 3Full Paid1502
Store 4Total Sold4001
Store 4Half Paid1603
Store 4Free404
Store 4Full Paid2002
1 ACCEPTED SOLUTION

Thanks for updating the post with your source table format 🙂 That really helped. You state you want the slicers on your page being repsected when this measure is evaluated. The measure you are looking for is this:

Sum QTY Total Sold = 
CALCULATE(
    SUM(BI_Sales[Qty]); 
        BI_Sales[Atribute] = "Total Sold"
    )
)

You were very close. You don't need to give a complete new context of the datamodel to the CALCULATE statement; you want to filter in the current context this measure is evaluated in. By using FILTER(ALL(table),<exp>), you essentially throw away all filters imposed by your report slicers and filter the dataset your self.

Try putting this in a Card visual and see if that reflects the right value 🙂

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
v-jayw-msft
Community Support
Community Support

Hi @gluizqueiroz ,

 

To be honest, I don't quite understand what you want. It would be better to share some sample data and expected result to us id you don't have any Confidential Information. However, if you don't want a visual be effected by a slicer, you could use Edit Interactions feature.

1.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

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

Hey @v-jayw-msft 
I have updated the post to be easy to understand my question.
Sorry for my mistake when creating the post.

Thanks for updating the post with your source table format 🙂 That really helped. You state you want the slicers on your page being repsected when this measure is evaluated. The measure you are looking for is this:

Sum QTY Total Sold = 
CALCULATE(
    SUM(BI_Sales[Qty]); 
        BI_Sales[Atribute] = "Total Sold"
    )
)

You were very close. You don't need to give a complete new context of the datamodel to the CALCULATE statement; you want to filter in the current context this measure is evaluated in. By using FILTER(ALL(table),<exp>), you essentially throw away all filters imposed by your report slicers and filter the dataset your self.

Try putting this in a Card visual and see if that reflects the right value 🙂

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




JarroVGIT
Resident Rockstar
Resident Rockstar

Can you give some sample data? I don't understand the underlying datamodel (nor can I derive it from your matrix). 

Thanks!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hey @JarroVGIT
I have updated the post to be easy to understand my question.
Sorry for my mistake when creating the post.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.