Forum Discussion
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
- AnonymousNot 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 !
- AnonymousNot applicable
What do you think about it ? :)
- popovResolver III
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]
)- AnonymousNot 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.