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
Sathvik123
Helper V
Helper V

call field from slicer values in dax

Hello All,

 

I have table having data like below with 3 trend types daily , weekly and monthly.

Now my requirement is I need to give an option to end user to select daily, weekly and monthly.( I cant take trendtype to filter directly as I am calculating quarterly in power bi dax)

 

So for this I created a table in power bi with values Daily, weekly and monthly and put them in slicer.

 

But I am not sure what is the dax command used here to call my trendtype values from table based on selected slicer value.

 

Could any one please help

 

Capture.JPG

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Sathvik123 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Sathvik123 ,

 

Not very clear about this sentence: I cant take trendtype to filter directly as I am calculating quarterly in power bi dax.

 

And I tried to reproduce your scenario based on :So for this I created a table in power bi with values Daily, weekly and monthly and put them in slicer.

For Slicer = {"Daily","Weekly","Monthly"}

Then create a flag measure for visual-filter later:

Filter Flag = IF(MAX('Table'[TrendType]) in ALLSELECTED('For Slicer'[Value]),1,0)

Eyelyn9_0-1652678906159.png

 

Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Sathvik123 , You Take Date and Sum of Sales in a visual and Trend Type in a single select slicer and use that

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.