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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Problem with filters

Hello, I have a problem with a filter in a calendar table and I am not being able to figure out what I am doing wrong. The issue seems simple, but the filter expression that I am using doesn´t work the way I want. All the information is in the same table.

When I click on the month number on the slicer I want the measure to show de last date of the month selected. In the case of the picture below it should show 31/05/2020 for all Month_year lines and not 31/12/2020.

fguarnieri00_0-1603324485065.png

 

I appreciate the help.

 

Thanks!! 

 

 

1 ACCEPTED SOLUTION
DavisBI
Solution Specialist
Solution Specialist

Hi, @Anonymous ,

 

 If you look at the screenshots I provided, your requirements have been met. But I may need to add that slicers are not related to the main table, you can test it again.

 

Best!

 

Mark this post as solution if this helps,thanks!

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Which table does the Month selection come from? Certainly it does not come from dCalendario. If that were the case, you wouldn't see all those Month_year (mm/aa) values in the table. If you set it all up in such a way that the Month slicer does NOT affect what you see in the table, then there is no way to get what you want. What you have to do is have a second independent table from which you'll be selecting the reference year and month. Then you'll be able to extract the ref year and month for all the entries in the table and create the date you want. No other way around this.
Anonymous
Not applicable

Hello @Anonymous, all the information comes from the same calendar table (dcalendario). It is showing all the Month_year because the interaction between the slice and the table is inactive. I need to show the Month_year.
I didn´t think about creating a second table, it is a good way around. I am going to try and will let you know if works.

Thanks for the insights!! 

Capturar.JPG 

DavisBI
Solution Specialist
Solution Specialist

Hi, @Anonymous ,

 

 If you look at the screenshots I provided, your requirements have been met. But I may need to add that slicers are not related to the main table, you can test it again.

 

Best!

 

Mark this post as solution if this helps,thanks!

Anonymous
Not applicable

Thank you so much!! It is working perfectly!!!

Anonymous
Not applicable

So you don't have much choice but to have another, disconnected table that will host your years and months from which you'll be able to select your ref pieces of time. And it's not a workaround. It's the ONLY and in fact the only correct way to do what you want.
Anonymous
Not applicable

Hello;

Thanks for your help @DavisBI and @Anonymous , but I still can´t get it to work.

I need the table to show the last day of the selected month for all the dates, in the case below it should show 31/07/2020 for all the Month_year (mm/aa) lines and it is showing the last day of each month_year.

 
 

Capturar.JPG

Anonymous
Not applicable

@Anonymous  You can use this below formula 

calculate (EOMONTH([calenderio date], Selectedvalue(month))

Thank you 

DavisBI
Solution Specialist
Solution Specialist

Hi, @Anonymous ,

In this case you can use selectedvalue() . The following is for your reference:

 

Measure = EOMONTH(DATE(<year>,SELECTEDVALUE('Table'[Value]),1),0)

 

20201022100118.png

 

Mark this post as solution if this helps,thanks!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors