Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
srlabhe
Helper I
Helper I

Creating a column in report based on live connection with dataset

Hi All,

I am trying to create a column in report which is based on previously built dataset but it doesnt give me create a new column.

The scenario is below 

srlabhe_0-1692284618831.png

I wanted create a conditional column like 

if Vendor Primary = Vendor Account No then 1 else 0 and then base don that i will highlight the row with some background color.

 

Create column option is not available when I right click on table

 

srlabhe_1-1692284752260.png

 

Ideas appreciated....

4 REPLIES 4
vicky_
Super User
Super User

Is it possible that you're on direct query mode? You can't create new columns in a table on direct query. 
But if you still want to do conditional formatting, you don't need to create a calculated column, just create a measure and format based on that.

Yes i am on DQ mode, also how would we create measure comparing two column values?

 

Hi @srlabhe 

You can refer to the following measure

Measure =
IF (
    SELECTEDVALUE ( 'Table'[Vendor Primary] )
        = SELECTEDVALUE ( 'Table'[Vendor Account] ),
    1,
    0
)

Then put the field to the conditional formatting

vxinruzhumsft_0-1692860489515.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

@v-xinruzhu-msft i tried the same andmoment i add the measure in report it shows me many records as below

srlabhe_0-1692882036506.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.