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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Dax referring Excel

Hi All,

 

 I have two files country detail & Id. Result will be country & value for specific ID & code

 

Country

India

Pakistan 

Bangladesh 

Srilanka

 

Value       ID       Code

55          24          C1

42           8           C2

60           8           C3

70           25         C4

I write a Dax like

 

Country Values = 

Var Country = SelectedValues(Country)

Var India_Value = Calculate(sum(Values),Id=8,Code=C3)

Var Result = Switch(Country,"India",Indian_Value)
Return
Result

 

I have to write for more condition,for all those condition can I refer from excel file and specifiy column name in condition place will it work

 

1 REPLY 1
rajulshah
Resident Rockstar
Resident Rockstar

@Anonymous ,

 

You sure can do that, but that is not advisable. Do you have any column in tables that can be used to relate both of them? If so, you just have to write one measure, and everything would work automatically.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors