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
Anonymous
Not applicable

Measure (based on 2 other measures) to ignore slicer 1 but include slicer 2?

Dear all,

 

I have the following.

 

DAX Measure 1: Valves Open Orders = CALCULATE(COUNTROWS(FactTable_Orders), FILTER(FactTable_Orders, FactTable_Orders[ProductType] = "Valves"), FILTER(FactTable_Order, FactTable_Orders[Status] = "Open"))

 

DAX Measure 2: Open Orders = CALCULATE(COUNTROWS(FactTable_Orders), FILTER(FactTable_Orders, FactTable_Orders[Status] = "Open"))

 

DAX Measure 3: Valves % of Open Orders = DIVIDE (Valves Open Orders, Open Orders) *100

 

On the report page, I have a slicer for Regions e.g. North, South, East, West and for Month e.g. Jan, Feb, Mar, etc.

 

How do I modify Measure 3 to show Valves % of Total Open Orders when using the slicer? That is when I use the slice to "North" I would like Measure 3 to give me Valves Open Orders for North Region divided by the Total Open Orders instead of North Open Orders while taking into consideration the Month slicer?

 

Can someone point me to the right direction?

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the following measure 3 to archive your requirement:

 

Valves % of Open Orders =
DIVIDE (
    [Valves Open Orders],
    COUNTROWS (
        FILTER (
            ALLEXCEPT ( 'FactTable_Orders', 'FactTable_Orders'[Regions] ),
            'FactTable_Orders'[Status] = "Open"
        )
    )
) * 100

Best regards,

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

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

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the following measure 3 to archive your requirement:

 

Valves % of Open Orders =
DIVIDE (
    [Valves Open Orders],
    COUNTROWS (
        FILTER (
            ALLEXCEPT ( 'FactTable_Orders', 'FactTable_Orders'[Regions] ),
            'FactTable_Orders'[Status] = "Open"
        )
    )
) * 100

Best regards,

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

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
smpa01
Super User
Super User

@Anonymous  Can you please try the following measures before you do DIVIDE to see if they behave to your liking and yet produces a subset of the data based on the slicer values selected

Valves Open Orders:=
CALCULATE (
    COUNTROWS ( FactTable_Orders ),
    KEEPFILTERS (
        FILTER (
            ALL ( FactTable_Orders[ProductType], FactTable_Orders[Status] ),
            AND (
                FactTable_Orders[ProductType] = "Valves",
                FactTable_Orders[Status] = "Open"
            )
        )
    )
)
Open Orders:=
CALCULATE (
    COUNTROWS ( FactTable_Orders ),
    KEEPFILTERS (
        FILTER ( ALL ( FactTable_Orders[Status] ), FactTable_Orders[Status] = "Open" )
    )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.