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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
jmarciogsousa
Frequent Visitor

Filter table with calendar date not related

Hi,

I would like sign if one id contains valid contract with base on date slicer.
I got it working when has the dates context on the table, but when I remove the dates from the table it returns one value that I don't expect:

I would like that this table returns FielterDateGueltig = 1 for P625 and P626:

jmarciogsousa_0-1711974605223.png

jmarciogsousa_1-1711974762153.png


Thank you for your attention.

All the best,
Joao

 

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

Hi @jmarciogsousa ,

 

According to your statement, I think you need a summarize result. I suggest you to try ALLSELECTED() function in your measure.

My Sample:

vrzhoumsft_0-1712027889977.png

Measure:

FilterDateGueltig = 

VAR _T1 = 
FILTER(ALLSELECTED(BefoerderungsplanGueltig),
AND(
    OR([gueltig_von]<[MinDateSlicer],[gueltig_von] < [MaxDateSlicer]),
    OR([gueltig_bis]> [MinDateSlicer],[gueltig_bis]>[MaxDateSlicer]))
)
RETURN
COUNTAX(FILTER(_T1,[Befplannummer] = MAX(BefoerderungsplanGueltig[Befplannummer]) && [Wagenfahrten] = MAX(BefoerderungsplanGueltig[Wagenfahrten])),[Befplannummer])

Result is as below.

vrzhoumsft_1-1712027916324.png

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @jmarciogsousa ,

 

According to your statement, I think you need a summarize result. I suggest you to try ALLSELECTED() function in your measure.

My Sample:

vrzhoumsft_0-1712027889977.png

Measure:

FilterDateGueltig = 

VAR _T1 = 
FILTER(ALLSELECTED(BefoerderungsplanGueltig),
AND(
    OR([gueltig_von]<[MinDateSlicer],[gueltig_von] < [MaxDateSlicer]),
    OR([gueltig_bis]> [MinDateSlicer],[gueltig_bis]>[MaxDateSlicer]))
)
RETURN
COUNTAX(FILTER(_T1,[Befplannummer] = MAX(BefoerderungsplanGueltig[Befplannummer]) && [Wagenfahrten] = MAX(BefoerderungsplanGueltig[Wagenfahrten])),[Befplannummer])

Result is as below.

vrzhoumsft_1-1712027916324.png

 

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.