Forum Discussion

ongzph's avatar
ongzph
Frequent Visitor
9 years ago
Solved

Help: Using earlier row values as condition

Sorry if the question title sounds confusing; I'm not really sure how to phrase it nicely. It's my first time doing this kind of work so due apologies if anything is phrased confusingly.   I have a...
  • MarcelBeug's avatar
    9 years ago

    This is the kind of data shaping to be done with M (Power Query), not with DAX.

    In "Edit queries", add column "Country" with formula

     

    if [CountryOrCity] = "Country" then [Location] else null

     

    Next, go to the Tranform tab, make sure the new Country column is selected, and choose Fill - Fill Down.