Forum Discussion

beeEc009's avatar
beeEc009
Regular Visitor
3 years ago

DAX- Return a value based on two columns

 Hi all, 

 

I'm new to DAX and am trying to create a measure for a large report.

 

I have multiple (About 1000) states names & Ids with data names (about 10), Ids and values. I have created a small dataset in a similar format for this purpose.

 

 

I'm trying to create a dax measure that returns a value as percentage when data name is Amm Rate regardless of the state name, returns a value as currency when data name is Am Revenue or returns a value as number when data name is Ami Result.

1 Reply

  • beeEc009 , a new meausre

     

    divide(Sum(Table[Value]), calculate(Sum(Table[Value]), Table[Data Name] ="Amm Rate") )