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
kitti
Helper III
Helper III

different types of multiple visuals filtering with a date segmentation

Hello experts,

I'd like to know how to create a date segmentation that can handle different visual criteria.

For example, suppose I have a dashboard, which consists of 4 visuals and a date segmentation. If I select 30-APR-2020, the 2 visuals will display the data for the last 2 weeks of the selected date (16-APR to 30-APR) while the rest show the data on that date (30-APR).

We appreciate any help

Thanks a lot.

In

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @kitti 

Please refer to this demo.  pbix attached

If it helps ,try the following  steps:

1.copy out table2 and use the field of table2 to create table visual

Table 2 = SELECTCOLUMNS('Table',"Date",'Table'[Date],"Type",'Table'[Type])

2.create a visual control measure and apply it to the new table visual pane

Measure =
VAR s_date =
    SELECTEDVALUE ( 'Date'[Date] )
VAR t_date =
    CALCULATE ( MAX ( 'Table 2'[Date] ) )
RETURN
    IF ( ( s_date >= t_date - 14 ) && ( s_date <= t_date ), 1, 0 )

70.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi, @kitti 

Please refer to this demo.  pbix attached

If it helps ,try the following  steps:

1.copy out table2 and use the field of table2 to create table visual

Table 2 = SELECTCOLUMNS('Table',"Date",'Table'[Date],"Type",'Table'[Type])

2.create a visual control measure and apply it to the new table visual pane

Measure =
VAR s_date =
    SELECTEDVALUE ( 'Date'[Date] )
VAR t_date =
    CALCULATE ( MAX ( 'Table 2'[Date] ) )
RETURN
    IF ( ( s_date >= t_date - 14 ) && ( s_date <= t_date ), 1, 0 )

70.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VasTg
Memorable Member
Memorable Member

@kitti 

 

I wouldn't change anything on the date dimension but change the mesures used in the 2 visuals to calculate for past two weeks based on the selected date. 

 

The  logic should be in the measures/axis columns used in the tile.

 

 

Connect on LinkedIn

@VasTg 

Thanks for reply

 

How about the date slicer? Currently, it is controlling the whole page for a date selection. For instance, I filtered the 2 measures in relative date filtering to show data in the last 2 weeks, but I tried to pick a date in March, then the data is disappeared because this month is May.

 

 

Thanks,

KL

VasTg
Memorable Member
Memorable Member

@kitti 

Please paste sample input and atleast one expected visual data to better assist you.

Connect on LinkedIn

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.