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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
gaurangb
New Member

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

 

1 REPLY 1
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @gaurangb,

Based on my research, I am afraid you could not achieve this feature currently, I suggest you submit an idea in ideas forum:

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.