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

Visualization using measure

Hi @TomMartens,

 

This is in continuation to your solution in this post:

https://community.powerbi.com/t5/Desktop/Interactive-Visualization-using-measure/m-p/764375#M368345

 

My output worked perfectly using your solution in the above post. 

However, the users are looking for the entire data in the table visualization and want me to also show the data if the length measure and width measure are both 2.

So basically the requirments are:

1, The table visual without any filters should look like the 1st image below.

2. Now if the users selects the length in the pie chart, The table should now filter to show only the highlighted cells of the Length ( you already have provided soltuions but with your solutions we are missing our Data)

3. The card visual ( count of ID) should also be interactive. 

 

Is this possible? Can you help adjust your code with these requirements??

Really appreacite your kind help!

 

Attaching sample file with your solutions in this.

 

https://www.dropbox.com/s/fz74m9ixrcfuaf2/Using%20a%20measure%20to%20filter%20the%20visible%20rows%2...

 

 

For example.

user wants to see the Table Data  ---> (ID:- CCB, CDCD and KK exist)

Capture11.PNG

After your proposed solution:( ID:- CCB, CDCD and KK are missing)

Capture12.PNG

Many Thanks,

Tejaswi

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous 

 

if you change the code of the measure "filter the rows" to this:

filter the rows = 
var _theTable = VALUES('Weight and Length'[Weight and Length])
var _allRows = COUNTROWS(ALL('Weight and Length'))
var _check = IF(COUNTROWS(_theTable) = _allRows , 1 , BLANK())
return
SUMX(
    'Sheet1 (2)'
    , MAXX(_theTable
        , var _weightORlength = [Weight and Length]
        return
        SWITCH(
            _weightORlength
            , "Weight" , if([WeightMeasure] = 1 , 1 , _check)
            , "Length" , IF([LengthMeasure] = 1 , 1 , _check)
        )
    )
) 

the table visual will be filtered as your users want it to be filtered.

Just use the measure "filter the rows" in your card visual.

 

This is how it will look like:

using a pie to filter a table - a little more advanced.gif

 

Hopefully this is what you are looking for.

 

Regards,

Tom

 

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey @Anonymous 

 

if you change the code of the measure "filter the rows" to this:

filter the rows = 
var _theTable = VALUES('Weight and Length'[Weight and Length])
var _allRows = COUNTROWS(ALL('Weight and Length'))
var _check = IF(COUNTROWS(_theTable) = _allRows , 1 , BLANK())
return
SUMX(
    'Sheet1 (2)'
    , MAXX(_theTable
        , var _weightORlength = [Weight and Length]
        return
        SWITCH(
            _weightORlength
            , "Weight" , if([WeightMeasure] = 1 , 1 , _check)
            , "Length" , IF([LengthMeasure] = 1 , 1 , _check)
        )
    )
) 

the table visual will be filtered as your users want it to be filtered.

Just use the measure "filter the rows" in your card visual.

 

This is how it will look like:

using a pie to filter a table - a little more advanced.gif

 

Hopefully this is what you are looking for.

 

Regards,

Tom

 

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi @TomMartens ,

Thank you so much..

It works as expected.

 

Thanks a lot and appreaciate all your help on this.

 

Regards,

Tejaswi

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.