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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.