Forum Discussion

gaurangb's avatar
gaurangb
New Member
7 years ago

Use DAX variable within measure

I need to generate multiple reports from different tables. The common columns are Name,Surname and, Date. There are others as well. 

 

I have created follwoing measure for to show in card visualization based on selection.

 

M_Name_Card = IF(HASONEVALUE(TABLE1[Name]),SELECTEDVALUE(TABLE1[Name]),"Multiple")
M_Surname_Card = IF(HASONEVALUE(TABLE1[Surname]),SELECTEDVALUE(TABLE1[Surname]),"Multiple")
M_Date = FORMAT(TABLE1[Date],"Mmm'YY")
M_Date_Card = IF(HASONEVALUE(TABLE1[Date]),SELECTEDVALUE(TABLE1[M_Date]),"Multiple")

 

I need to use the same measures with other Tables, Like Table 2, Table3... in different reports.

How can I use Table name as variable and use?

 

Gb