Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everybody! I imported data into Power BI as Folder. I have a column which contains text values and one of column contains decimal numbers. I would like to add a new calculated column in specific way: If the text column equals for example "XY", I want to make a calculation with the second column, and then everything else would be the same value from the second column (with decimal numbers) so I don't need to calculate where there isn't "XY" value in the first column. I don't know the syntax.
Thanks for every good idea.
Solved! Go to Solution.
It sounds like you want to use a calculated column in Power BI to first check if a specific text value exists in the first column, and if it does, use the second column to perform some calculation and return a new value.
To do this, you can use the "CASE" statement in DAX to check if the text value exists in the first column, and then use the "RETURN" statement to return a calculated value using the second column.
Here is an example of how you could set this up in your report:
1.Create a new calculated column in your report called "Special Value".
2.In the formula bar, enter the following expression:
CASE(Table1[Text Column], Table2[Column 2])
This will check if the text value exists in the first column, and if it does, will return the value from the second column, using the syntax of the "CASE" statement.
Note that this assumes that your "Table1" table contains the text values and your "Table2" table contains the values from the second column that you want to use for the calculation.
I hope this helps! Let me know if you have any questions or need further assistance.
It sounds like you want to use a calculated column in Power BI to first check if a specific text value exists in the first column, and if it does, use the second column to perform some calculation and return a new value.
To do this, you can use the "CASE" statement in DAX to check if the text value exists in the first column, and then use the "RETURN" statement to return a calculated value using the second column.
Here is an example of how you could set this up in your report:
1.Create a new calculated column in your report called "Special Value".
2.In the formula bar, enter the following expression:
CASE(Table1[Text Column], Table2[Column 2])
This will check if the text value exists in the first column, and if it does, will return the value from the second column, using the syntax of the "CASE" statement.
Note that this assumes that your "Table1" table contains the text values and your "Table2" table contains the values from the second column that you want to use for the calculation.
I hope this helps! Let me know if you have any questions or need further assistance.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |