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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hanuraolm
Helper I
Helper I

Slicer values should be filteted based on selected values (disconneted tables)

Sample data as below - 

BuildCategoryPRNumberSeq
b1Cat1PR10101
b2Cat2PR10222
b3Cat3PR103333
b4Cat1PR104444
b5Cat2PR10555
b6Cat3PR45676

 

Req –

 

In the above table we have a build column with text attribute and users need to capability to choose the fromBuild and toBuild. 

To achieve this we a created a sequence col based on build

Two disconnected tables based on build 1.FromBuild 2.ToBuild

Created a measure as below –

               # Of PRs =

CALCULATE (

    DISTINCTCOUNT (build[PRNumber] ),

    FILTER (

        build,

        (build[Seq] >= 5  && build[Seq]<=6)))

5,6 are hardcoded but these values are passing from disconnected tables. Now no issues every thing working as expected.

 

Now the problem is, if we need to create a slicer based on Category (highlited below) from build table and these values should be filtered between the selected fromBuild and toBuild values. This I couldn’t able to achieve this. Can you help on this.

 

hanuraolm_1-1689346587584.png

 

 

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

Hi @hanuraolm 

You can refer to the following measure, it does not need to create the seq column

# Of PRs =
IF (
    ISFILTERED ( frombuild[Build] ) && ISFILTERED ( frombuild[Build] ),
    CALCULATE (
        DISTINCTCOUNT ( build[PRNumber] ),
        FILTER (
            build,
            [Build] >= SELECTEDVALUE ( frombuild[Build] )
                && [Build] <= SELECTEDVALUE ( tobuild[Build] )
        )
    ),
    CALCULATE (
        DISTINCTCOUNT ( build[PRNumber] ),
        FILTER ( build, [Build] >= "b5" && [Build] <= "b6" )
    )
)

Output

vxinruzhumsft_0-1689557797989.png

 

Best Regards!

Yolo Zhu

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

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @hanuraolm 

You can refer to the following measure, it does not need to create the seq column

# Of PRs =
IF (
    ISFILTERED ( frombuild[Build] ) && ISFILTERED ( frombuild[Build] ),
    CALCULATE (
        DISTINCTCOUNT ( build[PRNumber] ),
        FILTER (
            build,
            [Build] >= SELECTEDVALUE ( frombuild[Build] )
                && [Build] <= SELECTEDVALUE ( tobuild[Build] )
        )
    ),
    CALCULATE (
        DISTINCTCOUNT ( build[PRNumber] ),
        FILTER ( build, [Build] >= "b5" && [Build] <= "b6" )
    )
)

Output

vxinruzhumsft_0-1689557797989.png

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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