Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have the following results in my Visual. I would like to replace the value in Column A with the value in Column B if Column B is equal to 3. Is there a way to reference the values in the visual without using the query columns that produced the results?
Begining with
ColumnA ColumnB
1 1
2 3
Desired results
ColumnA ColumnB
1 1
3 3
Solved! Go to Solution.
Hi @U156531 ,
You could set the filter condition in the visual filter pane:
Table:
Before setting:
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 @U156531 ,
So far, to my knowledge, there is no way to achieve it without measure or calculated column, but i suggest you create a measure to achieve it.
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR _b =
SELECTEDVALUE ( 'Table'[Column B] )
VAR _a =
SELECTEDVALUE ( 'Table'[Column A] )
RETURN
IF ( _b = 3, _b, _a )
3. add a table visual with fields and measure
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.
Thanks, That worked!
If I just want all the rows from both _a and _b in the same column how would I change this statement to accomplish that?
Hi @U156531 ,
You could try to splice them into a string.
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.
This has gotten me close to the solution but now I'm getting a lot of extra rows where the numeric values are blank. I've tried to filter them out by adding a filter to the Filters on this visual pane but it runs out of memory. Is there an enhancement that can be added to your formula that might filter out these extra rows with blank numeric values?
Thanks
Hi @U156531 ,
You could set the filter condition in the visual filter pane:
Table:
Before setting:
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.
It looks like this is going to reference the columns in the queries that produced the visual. Is there a method to directly reference the columns in the visual?
@U156531 , You can change the value directly in visual but you can create another table using DAX
NewColumn = IF([ColumnB] = 3, [ColumnB], [ColumnA])
Please accept as solution and give kudos if it helps
Proud to be a Super User! |
|
How do I change the value directly in the visual?
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.