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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
abhaygawde
Frequent Visitor

write DAX formula to return table

Can any one help to write DAX formula that will return table single column value dynamicallly base on switch case?

If in slicer i chose filter value A then show record from A table and if i filter B then show records from B table

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

Your explanation of the topic is too vague. We would like to see the data  with the expected output before proceeding ahead.

 

Can use HASONEVALUE function as well.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

X- AxisX- AxisY AxisY AxisData modelData model

Hi Bhavesh ,

 

Basically i have one requirement where i have 2 use measure as a axis.

I have 2 slicer X-Axis and Y-Axis . If i filter Business Group from X slicer and Actual Revenue from Y slicer then graph should Plot where X- axis values is from Bussiness group table and and Y- axis values from Acutal Revenue table.

 

Any help will be appriciated.

 

Thanks And Regards,

Abhay

 

 

@abhaygawde

 

We cannot use measure as X-Axis, only table column or calculated column can be used as X-Axis. So in Power BI, X-Axis is static and can only be filtered but cannot be changed to different values.

 

Slicer values are come from a column in a table. Slicer is used to filter column values. Once we select a value in the slicer, the table which contains this column or related table will be filtered. You can take a look at this document to see when to use a slicer.

 

So we cannot use slicer to choose which column to be used in the X-Axis of visual chart. However we can use measure for Y-Axis. If the X-Axis is defined (e.g. Business Group), the Y-Axis result can be changed based on your selection in Y slicer (measure names are listed in Y slicer). You can refer to this blog for details.

 

To display three different things (business group, date, program) on X-Axis, we can only create three different visuals with different X-Axis, or create a Hierarchy with 3 levels and use drill down to see different X-Axis.

write DAX formula to return table_1.jpg

 

Best Regards,

Herbert

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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