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.
Hello everyone,
Is it possible to filter elements of rows in matrix using a measure?
To explain :
I have a "Smart parent entity" measure which returns the entity to be displayed according to the filters selected. when I select
I would like to display the values for the selected entity and its children (entite_parent = smart_entite_parent)
I have 2 tables :
Table arbo
and table : "table donnees"
region, departement and pays are calculated columns. they are used to create "smart entite parent"
Here I would only to see Groupe Mayenne :
The measure in matrix to see value is :
Solved! Go to Solution.
I found solution : I modified Smart_entite_parent. I replaced Haveonevalue by haveonefilter
So
SMART_ENTITE_PARENT =
and
hello @Anonymous,
what is the reason for keeping all the levels of the hirearchy in the Fact table (table de données)?
Can't you just keep the data at the lowest level of the hirearchy?
It seems bad practice to have the data set up like that in my opinion
Hi @m3tr01d ,
Users need to have this information, so I need to keep it 😞
How would you have configured data ?
Thank you for your help
@Anonymous Yes, you want what I call a Complex Selector. The Complex Selector - Microsoft Power BI Community
Hi @Greg_Deckler Thanks for your reply but I don't see how the complex selector can act on the names of my lines. Could you help me on this? thank you very much.
@Anonymous In general, assuming a disconnected table for your slicer:
Complex Selector Measure =
VAR __Group = SELECTEDVALUE('SlicerTable'[Column])
VAR __CurrentGroup = MAX('Table'[Group])
RETURN
IF(__Group=__CurrentGroup,1,0)
Hi @Greg_Deckler,
I tried this solution, but it doesn't work because SMART_ENTITE is a measure
I found the beginning of a pontential solution.
I modified the displayed dax measure :
New Measure =
VAR entite_parent = "GROUPE MAYENNE"
RETURN
IF (
NOT ISINSCOPE ( Table_donnees[LIB_ENTITE] ),
CALCULATE (
CALCULATE (
SUM ( Table_donnees[VALEUR] ),
FILTER ( Table_donnees, Table_donnees[LIB_ENTITE] = entite_parent )
),
ALL ( Table_donnees[ENTITE_PARENT] ),
TREATAS ( VALUES ( Table_donnees[ENTITE_PARENT] ), Table_donnees[LIB_ENTITE] )
),
CALCULATE (
SUM ( Table_donnees[VALEUR] ),
FILTER ( Table_donnees, Table_donnees[ENTITE_PARENT] = entite_parent )
)
)
and it shows me what I want to see for the "Groupe Mayenne"
But now I would like to change the group "Groupe Mayenne"to SMART_entite so that it varies. But it doesn't work :
Do you know how I could do it?
Thanks
I found solution : I modified Smart_entite_parent. I replaced Haveonevalue by haveonefilter
So
SMART_ENTITE_PARENT =
and
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |