Forum Discussion
3-column table with texts
- 3 years ago
Hi , Syndicate_Admin
Thanks for your quick response !
According to your description, you want to select in a slicer visual , and show the current month data and the previous data in two tables. Right?
Here are the steps you can refer to :
(1)This is my test data:
(2)We can click "New Table" to create a date table as a slicer :
Table 2 = ADDCOLUMNS( CALENDAR(FIRSTDATE('Table'[Date]), LASTDATE('Table'[Date])) , "year_month" , FORMAT([Date],"mmmm yy"))(3)Then we can create two measure :
Cur Momth = var _slicer =MIN('Table 2'[Date]) var _t =SELECTCOLUMNS( FILTER( ALLSELECTED('Table') , YEAR('Table'[Date])=YEAR(_slicer) && MONTH('Table'[Date])=MONTH(_slicer) ) ,"Datos",[Datos]) return IF( MAX('Table'[Datos]) in _t ,1, 0 )Previous Month = var _slicer = MIN('Table 2'[Date]) var _previous_month = EOMONTH(_slicer,-2)+1 var _t =SELECTCOLUMNS( FILTER( ALLSELECTED('Table') , YEAR('Table'[Date]) = YEAR(_previous_month) && MONTH('Table'[Date]) = MONTH(_previous_month)) ,"Datos" , [Datos]) return IF( MAX('Table'[Datos]) in _t ,1,0)(4)Then we can put the 'Table 2'[year_month] on the visual and we can configure the measure on the "Filter on this visual" and then we can meet your need:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, Syndicate_Admin
According to your description, do you want to use 3 slicers to filter 3 visuals separately?
If this , you can try to configure it in "Edit interaction":
For more information, you can refer to :
Change how visuals interact in a report - Power BI | Microsoft Learn
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly