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
jacostabarbosa
Frequent Visitor

Filtering data without getting repeated data when drilling down

Hi all, I'm currently trying to filter gross sales by specific order types in such way that if I add date and order type to the row field in a matrix it'll show the data distributed by date and order type. However, the measure seems to work only with date as follows:

jacostabarbosa_0-1683170041299.png

Once I keep drilling down to the next level which are the order types instead of only showing the order types that i need (035,036,037,038,040,041,042)it shows all of them and even worst with the same value which is wrong.

jacostabarbosa_1-1683170159263.png

 

this is my measure:

 

COF_Warranty costs =
CALCULATE(
    [Gross Sales],
    'ANZ  Sales'[Order Type]
        IN { "035", "036", "037", "038", "040", "041", "042" }
)
 
can anyone give me some hints on what needs to be added to the measure? 
Thanks 

 

 

1 ACCEPTED SOLUTION
jacostabarbosa
Frequent Visitor

I've modified my measure and it's working fine now

COF_Warranty costs =
CALCULATE(
    SUM('ANZ  Sales'[Gross Sales AUD]),
    FILTER(
        'ANZ  Sales',
        'ANZ  Sales'[Order Type] IN {"035", "036", "037", "038","040","041","042"}
    )
)

View solution in original post

3 REPLIES 3
jacostabarbosa
Frequent Visitor

I've modified my measure and it's working fine now

COF_Warranty costs =
CALCULATE(
    SUM('ANZ  Sales'[Gross Sales AUD]),
    FILTER(
        'ANZ  Sales',
        'ANZ  Sales'[Order Type] IN {"035", "036", "037", "038","040","041","042"}
    )
)
lbendlin
Super User
Super User

the measure is likely fine.  It's your data model that needs fixing. The same value down a column indicates a mis-wired data model.

The model is correct it was just the incorrect measure. 

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.