Calculated column that repeats a season by docnr.

Pivvv

New Member
Joined
Aug 25, 2014
Messages
10
Below I have a screenshot of all documentnumbers but in the column Season I only get the season in one of the Documentlines.
I am now trying to create a calculated column that repeats the season for each line of a docnr.
I'm feeling that I have to use the function EARLIER but I can't get it to work.


148lopw.png


The endresult should be the green column. This is pretty easy with Excelformulas but not so easy in DAX :(
I'm trying for 2 hours now but maybe I should start reading a book instead of using google + trial and error :) Altough I learned a lot in the meantime!
Does somebody knows a way out?

29dg2g1.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
This looks like something you should fix in your table before importing to PowerPivot (e.g. with Power Query), and it might make sense to have a separate lookup table with just Docnr & Season...

...but, to do it with DAX as a calculated column in your existing table, I would probably do it this way:

Code:
=CALCULATE (
    IF ( HASONEVALUE ( Table1[Season] ), VALUES ( Table1[Season] ) ),
    ALLEXCEPT ( Table1, Table1[Docnr] ),
    Table1[Season] <> "NA"
)
 
Upvote 0

Forum statistics

Threads
1,225,562
Messages
6,185,675
Members
453,314
Latest member
amitojsd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top