The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have a requirement to show the same row based on slicer selection.
when index is selected as TTF then automatically i need to see 2 rows of same columns as per below screenshot.
when index is selected as Matif then automatically i need to see 2 rows of same columns as per below screenshot.
may i know how to acheive this ? Please any suggestion will help
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Please try below steps:
1. below is my test table
Table:
Table2:
2. create a measure with below dax formula
Measure =
VAR idx =
SELECTEDVALUE ( 'Table 2'[Index] )
VAR tmp =
SUMMARIZE (
ALL ( 'Table' ),
[Index],
[Last Value],
[Assumption Scenario],
[Correlation],
"CTN", COUNTROWS ( 'Table' ),
"ID", CONCATENATEX ( 'Table', [ID] )
)
VAR tmp1 =
FILTER ( tmp, [CTN] >= 2 && [Index] = idx )
VAR str =
CONCATENATEX ( tmp1, [ID] )
VAR val =
IF ( CONTAINSSTRING ( str, SELECTEDVALUE ( 'Table'[ID] ) ), 1, 0 )
RETURN
IF ( HASONEFILTER ( 'Table 2'[Index] ), val, 1 )
3. add a table visual with Table fields, add a slicer with Table 2 field, add measure to table visual filter pane and set
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try below steps:
1. below is my test table
Table:
Table2:
2. create a measure with below dax formula
Measure =
VAR idx =
SELECTEDVALUE ( 'Table 2'[Index] )
VAR tmp =
SUMMARIZE (
ALL ( 'Table' ),
[Index],
[Last Value],
[Assumption Scenario],
[Correlation],
"CTN", COUNTROWS ( 'Table' ),
"ID", CONCATENATEX ( 'Table', [ID] )
)
VAR tmp1 =
FILTER ( tmp, [CTN] >= 2 && [Index] = idx )
VAR str =
CONCATENATEX ( tmp1, [ID] )
VAR val =
IF ( CONTAINSSTRING ( str, SELECTEDVALUE ( 'Table'[ID] ) ), 1, 0 )
RETURN
IF ( HASONEFILTER ( 'Table 2'[Index] ), val, 1 )
3. add a table visual with Table fields, add a slicer with Table 2 field, add measure to table visual filter pane and set
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Any suggestions please ?
Thanks
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |