Forum Discussion
Custom column for report using Power BI Dataset
I'm trying to create a report in Power BI Desktop using a Power BI Dataset sitting in a workspace. I want to customise some values for a report showing animal data. Specifically, for the column "Current Animal Type", I want to change the values "Cat" and "Kitten" to "Feline".
Normally, I would add a custom column and use the following DAX to acheive this:
New Animal Type = IF('Animal'[Current Animal Type] IN {"Cat", "Kitten"}, "Feline", 'Animal'[Current Animal Type])
However, the ability to add a custom column to my report is disabled when using a Power BI Dataset. Is there another way to achieve this?
Please note, I do not have the ability to change the dataset and I only want to do this for one report. Any help you can give will be much appreciated.
SBDEV You can only do measures (not columns) in live query mode (which is how you connect to Power BI Datasets).
You could try a new MEASURE:
New Animal Type = IF(SELECTEDVALUE'Animal'[Current Animal Type]) IN {"Cat", "Kitten"}, "Feline", SELECTEDVALUE('Animal'[Current Animal Type]))
3 Replies
- AllisonKennedyCommunity Champion
SBDEV You can only do measures (not columns) in live query mode (which is how you connect to Power BI Datasets).
You could try a new MEASURE:
New Animal Type = IF(SELECTEDVALUE'Animal'[Current Animal Type]) IN {"Cat", "Kitten"}, "Feline", SELECTEDVALUE('Animal'[Current Animal Type]))- SBDEVRegular Visitor
Awesome!! Thank you, AllisonKennedy. That worked!
- AllisonKennedyCommunity Champion
You're welcome. Glad to help. 🙂