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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Combine column by if

Hello all

 

Simple scenario, but i cant figure out a solution by myself...

Have a table with 2 columns: [ValueWhenEven] and [ValueWhenOdd]

I should display the column that matches the next weeks number.

For example: Next week is no 14, this is even, so i should show [ValueWhenEven].

 

I though of creating a column with the following formula, but it does not work:

Combined = if(MOD(SELECTEDVALUE(DateTable[Week]);2) = 0; 'Operatives'[ValueWhenEven]; 'Operatives'[ValueWhenOdd])

I think this is because im using a column, so the value cant refresh itself.

Is there a way to do this with a measure?

 

FYI: It always shows the [ValueWhenEven] value

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Since it's a measure it can only go into the Values secttion. If you want to put it on rows/columns/slicers/etc is has to be a column in your data. Can be calculated column or a column that is created in Power Query. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Works now with a measure like this:

Combined = IF([OddOrEven] = "even"; FIRSTNONBLANK('Operatives'[ValueWhenEven];TRUE());FIRSTNONBLANK('Operatives'[ValueWhenOdd]; TRUE()))

But i cant drag it into my matrix, is there a way to do that?

Anonymous
Not applicable

Since it's a measure it can only go into the Values secttion. If you want to put it on rows/columns/slicers/etc is has to be a column in your data. Can be calculated column or a column that is created in Power Query. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors