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.
Hi,
Is it possible to change the values in only selected rows in a table based on a slicer selection?
Values in Total Count, Acutal Value and Project Value are obtained from Measures.
My data when all values are selected in sub category slicer is
Data | Total Count | Actual value | Projected value |
A | 100 | 55 | 60 |
B | 100 | 55 | 60 |
On choosing values from the sub category slicer, the table has to changes as below. The "A" row remains unchanged, but "B" row value changes.
Data | Total Count | Actual value | Projected value |
A | 100 | 55 | 60 |
B | 95 | 45 | 43 |
The values in Data column is obtained from a disconnected table.
Solved! Go to Solution.
Hi , @mahoneypat
Is the expected result you provided wrong?
Is this your real expected result?
Please check if the following measure helps.
Compare_Total Actual value =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table 3'[Data] ) = "A", 'Table 1'[Total Actual_value],
SELECTEDVALUE ( 'Table 3'[Data] ) = "B", 'Table 1'[S_Total Actual_value]
)
.....
Here is a sample pbix attached.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@sreekanths , We need more information on data. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Input data
product | Project value | Actual value | sub category | Count |
1 | 12 | 15 | x | 20 |
2 | 13 | 12 | x | 20 |
3 | 12 | 5 | y | 20 |
4 | 11 | 5 | y | 20 |
5 | 12 | 18 | z | 20 |
Data |
A |
B |
Default view on pbix - no selection on sub-categories filter
Data | Total Count | Actual value | Projected value |
A | 100 | 55 | 60 |
B | 100 | 55 | 60 |
Expected output on choosing Sub Category values x and z
Data | Total Count | Actual value | Projected value |
A | 100 | 55 | 60 |
B | 100 | 45 | 43 |
Hi , @mahoneypat
Is the expected result you provided wrong?
Is this your real expected result?
Please check if the following measure helps.
Compare_Total Actual value =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table 3'[Data] ) = "A", 'Table 1'[Total Actual_value],
SELECTEDVALUE ( 'Table 3'[Data] ) = "B", 'Table 1'[S_Total Actual_value]
)
.....
Here is a sample pbix attached.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not totally clear on what your goal is, but you can have row dependent logic with an approach like this
NewMeasure = if(selectedvalue(Table1[ColumnInVisual])=selectedvalue(DisconnectedTable[Value]), [MeasureForBRow], [MeasureForOtherRows])
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Can you please explain which table you are referring to in your expression - NewMeasure = if(selectedvalue(Table1[ColumnInVisual])=selectedvalue(DisconnectedTable[Value]), [MeasureForBRow], [MeasureForOtherRows])
I am getting Data from one table and all other values from another table.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |