Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello all,
I have filter in my table with a dax query:
Solved! Go to Solution.
Hi @Spyrosmak
You can try the follwing solution.
the following is my test result.
Sample main table.
Calendar table.
Create the following measure
IsInDateRangeOrPending(weekly) =
IF (
SELECTEDVALUE ( 'Main Query'[date] ) >= FIRSTDATE ( Date_Table_end[Date] )
&& OR (
SELECTEDVALUE ( 'Main Query'[date] ) <= LASTDATE ( Date_Table_end[Date] ),
SELECTEDVALUE ( 'Main Query'[column1] ) = "Pending"
),
1,
0
)
Then put the measure to the visual filter.
Then put the date of clendar table to a slicer, then it can work.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
I have tried this
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hello yes you are right, I changed the order however now the filter doesn't work at all. It changes the dates effectively but it doesn't affect my table. (the date table doesn't have relationship with the main table)
Hi @Spyrosmak
You can try the follwing solution.
the following is my test result.
Sample main table.
Calendar table.
Create the following measure
IsInDateRangeOrPending(weekly) =
IF (
SELECTEDVALUE ( 'Main Query'[date] ) >= FIRSTDATE ( Date_Table_end[Date] )
&& OR (
SELECTEDVALUE ( 'Main Query'[date] ) <= LASTDATE ( Date_Table_end[Date] ),
SELECTEDVALUE ( 'Main Query'[column1] ) = "Pending"
),
1,
0
)
Then put the measure to the visual filter.
Then put the date of clendar table to a slicer, then it can work.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Spyrosmak
This issue can be caused due to MIN not treating the returned value as a date.
Try using FirstDate() and LastDate() instead.
Is this trying to make a calculated column or a measure used in a table visual?
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hello,
I have tried this
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 31 | |
| 25 |