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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Clout
Helper III
Helper III

Need DAX and M formula for condition with date range

Hello guys,

I have this DAX Formula to visualise the limit between the 1.05 and 1.11 .

 

GW_TN =
VAR _date =
SELECTEDVALUE ( Frachten[Datum] )
RETURN
IF (
MONTH ( _date ) >= 5 && MONTH( _date) <= 11
&& DAY ( _date ) = 1
 
, MAX('Global'[GW_AblaufNges]))
 
 
However, I want now count the values which exceeded the limit within the time range. So I tried out his:
 
n_ÜS_TN =

VAR _date =
SELECTEDVALUE ( Frachten[Datum] )
RETURN
IF (
MONTH ( _date ) >= 5 && MONTH( _date) <= 11
&& DAY ( _date ) = 1
 
,
 
CALCULATE(COUNTROWS(Frachten),FILTER(Frachten, Frachten[AK_C_TN] <> Blank() && Frachten[AK_C_TN] > Max('Global'[GW_AblaufNges]))),BLANK()) + 0
 
But its not working, Im getting the value 0. 
 
 
And one thing more. 
 
I have this custom column:
 
if [AK_C_TN] is null then null else if [AK_C_TN] > #"Global"{0}[GW_AblaufNges] then [AK_C_TN] else null
 
But now I want to check if the value exceeded the limit within the range 1.05 till 1.11 too but in Power Query
 
Is it possible?
Thank you in advance!
 
 
 
 
1 REPLY 1
Anonymous
Not applicable

HI @Clout,

Power query not suitable for these type of calculations, you need to write and nest different table functions to looping and summary records.

BTW, can you please share some dummy data to help us clarify your data schema and test?

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors