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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
itsranga
Helper I
Helper I

DAX filter condition not working

Hi,

i have 2 table in Power bi 

 

Actual Data

itsranga_0-1738246797861.png

 

 

if i click table 1 any row created date based i need to filter second table schedule start date 

example (if click first table first row means created date is 01/20/2025 ,  second table schedule date need to filter 01/20/2025 to 01/14/2025)  scheduled between 20th to 14th data required)  i Used Measure

 

Measure = 
SWITCH(TRUE(),
SELECTEDVALUE(Table1[CreatedDate])=BLANK(),1,
SELECTEDVALUE(Table2[Schedule date])<=SELECTEDVALUE(Table1[CreatedDate])
  &&SELECTEDVALUE(Table2[Schedule date])>=SELECTEDVALUE(Table1[CreatedDate])-6,1,
0)

 

after filter i need no of ticket count Need

itsranga_1-1738246975022.png

I attached sample file

 

 

im using this DAX but its retun blank value

Measure 2 = CALCULATE(COUNTROWS(Table2),FILTER(Table2,SELECTEDVALUE(Table1[CreatedDate])<=SELECTEDVALUE(Table2[Schedule date]) &&SELECTEDVALUE(Table1[CreatedDate])>=SELECTEDVALUE(Table2[Schedule date])))

 

Download PBIX file 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @itsranga 

 

Please try this:

No of ID =
COUNTROWS ( FILTER ( 'Table2', 'Table1'[Measure] = 1 ) )

The result is as follow:

vzhengdxumsft_0-1738289823438.pngvzhengdxumsft_1-1738289833005.png

Best Regards

Zhengdong Xu
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
Anonymous
Not applicable

Hi @itsranga 

 

Please try this:

No of ID =
COUNTROWS ( FILTER ( 'Table2', 'Table1'[Measure] = 1 ) )

The result is as follow:

vzhengdxumsft_0-1738289823438.pngvzhengdxumsft_1-1738289833005.png

Best Regards

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors