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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Filter data with measure (pbix)

Hi,

 

could you please look at my pbix ?

https://drive.google.com/file/d/1EsHHr01aAha7_qPe7xqOiQKY4VuA57A_/view?usp=sharing

 

I want to filter a visualization (the one in yellow) with the result of a Measure (#ViewComparison, the one in red).

 

basically, first the user selects what data he wants to display. #ViewComparison is updated.

 

 

Thanks!

 

I'm new in Power BI, so if it's not the good method let me know

5 REPLIES 5
Anonymous
Not applicable

Hi,

 

on my report, the user can choose what data to display :

- area

- city

- county

- state

- country

 

Depending the selection I put in one measure the higher level :

if I select area , Measure = "city"

if i select city, Measure = "county"

....

 

My table contains all data and there's one column "Data Level"

 

On some of my visualization, I want to show data filtered on Measure. (to show a comparison with the user selection)

 

How is it possible ? unless it's not the right  method ?

 

many thanks !

 

Anonymous
Not applicable

What do you think about it ? 🙂

Hello, @Anonymous

Try this formula

#CalculVS =
SUMX (
    FILTER (
        ALL ( data );
        data[DATA_VIEW]
            = LOOKUPVALUE (
                selectionUser[LIB_VIEW];
                selectionUser[CODE_VIEW]; MAX ( selectionUser[CODE_VIEW] ) + 1
            )
    );
    data[VALUE]
)

 

Anonymous
Not applicable

Hello @popov,

 

it's nearly the solution. how can I add in this measure another filter like data[KPI] = "data1" ?

 

indeed, my chart on top left is filtered on data1, and #CalculVS is the sum of everything for my data view selected.

 

I tried with CALCULATE but it seems to work on the selection only.

 

 

Anonymous
Not applicable

How can I add another filter condition in the formula :

 

#CalculVS =
SUMX (
    FILTER (
        ALL ( data );
        data[DATA_VIEW]
            = LOOKUPVALUE (
                selectionUser[LIB_VIEW];
                selectionUser[CODE_VIEW]; MAX ( selectionUser[CODE_VIEW] ) + 1
            )
    );
    data[VALUE]
)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors