Forum Discussion
Tezaroyal
3 years agoFrequent Visitor
Dax Issue
Hi, Below is a measure for bookings between the created date column and the cancelled date column. I need to show the records that fall in the date range which i selected the slicer if any record ...
- Anonymous3 years ago
Hi Nani ,
If you select "show items with no data", then you need to place the measure booking on the visual object filter.
Or you can deselect "show items with no data".Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi Tezaroyal ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can update the measure.
Bookings = VAR __mindate = MIN('Calendar'[Date])
VAR __maxdate = MAX('Calendar'[Date])
VAR __curdate = MAX('report vwRevenueDashboardReport_BookingCard'[Createddate])
VAR __created =
SWITCH(
TRUE(),
__curdate < __mindate,
0,
ISBLANK(MAX('report vwRevenueDashboardReport_BookingCard'[Canceldate])),
0,1
)
VAR __cancelled =
SWITCH(
TRUE(),
MAX('report vwRevenueDashboardReport_BookingCard'[Canceldate]) >= __mindate
&& MAX('report vwRevenueDashboardReport_BookingCard'[Canceldate]) <= __maxdate,
-1,
ISBLANK(MAX('report vwRevenueDashboardReport_BookingCard'[Canceldate]))
,1
)
VAR __result = __created + __cancelled
RETURN
IF(MAX('report vwRevenueDashboardReport_BookingCard'[Canceldate]) in VALUES('Calendar'[Date]) || MAX('report vwRevenueDashboardReport_BookingCard'[Createddate]) in VALUES('Calendar'[Date]) ,__result ,BLANK())
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.