cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

WTD Calculation no funciona con filtros

Estoy intentando modificar el siguiente DAX para que funcione con mi filtro de marca. Actualmente, calculará para todas las marcas, pero no para cada marca por separado.

BookingWTDCurrent =
DÓNDE _CurrentDate = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] )
DÓNDE _CurrentWeekYear = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[SemanaNo])
DEVOLUCIÓN
CALCULAR(
'Reservas diarias RY'[RY BKGS],
FILTRO(TODO(DSH_DAILY_BOOKINGS_GRAPH),
DSH_DAILY_BOOKINGS_GRAPH[SemanaNo] = _CurrentWeekYear &&
DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] <= _CurrentDate )
)
Todas las marcas
DMatlock06_0-1643388042402.png

Filtrado por marca

DMatlock06_1-1643388168899.png

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

BookingWTDCurrent =
VAR _CurrentDate = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] )
VAR _CurrentWeekYear = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[WeekNo])
RETURN
CALCULATE(
'Daily Bookings RY'[RY BKGS],
ALLEXCEPT(DSH_DAILY_BOOKINGS_GRAPH[Brand]),
DSH_DAILY_BOOKINGS_GRAPH[WeekNo] = _CurrentWeekYear,
DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] <= _CurrentDate )
 

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

BookingWTDCurrent =
VAR _CurrentDate = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] )
VAR _CurrentWeekYear = SELECTEDVALUE(DSH_DAILY_BOOKINGS_GRAPH[WeekNo])
RETURN
CALCULATE(
'Daily Bookings RY'[RY BKGS],
ALLEXCEPT(DSH_DAILY_BOOKINGS_GRAPH[Brand]),
DSH_DAILY_BOOKINGS_GRAPH[WeekNo] = _CurrentWeekYear,
DSH_DAILY_BOOKINGS_GRAPH[REQUEST_DATE] <= _CurrentDate )
 

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Top Kudoed Authors