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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DanduMani104
Helper III
Helper III

DAX measure

Hi team....
I Have S_SPL_QMR_DO_WEEKLY_2024_F table in power bi. In that table tour request numbers, week number, departure year, Qt exclude flag, columns are there. I want to showthe distinct Tour count for each week in line chart. but For that weeks the the tour count should be count separatly from Current week to Last 6 weeks counts, in that line chart week numbers should be change weekly when data is refreshed as schedule refresh.For that distinct counts the filter conditions are 'S_SPL_QMR_DO_WEEKLY_2024_F'[DEPARTURE_YEAR]=YEAR(TODAY()) , 'S_SPL_QMR_DO_WEEKLY_2024_F'[QT_EXCLUDE_FLG]=0.

DanduMani104_0-1704719924018.png

I want to show like this in power bi line chart. I have used this DAX measure

*Offers-2024 =
 CALCULATE(DISTINCTCOUNT('S_SPL_QMR_DO_WEEKLY_2024_F'[TOUR_REQUEST_NO]),
ALLEXCEPT('S_SPL_QMR_DO_WEEKLY_2024_F', 'S_SPL_QMR_DO_WEEKLY_2024_F'[WEEK_NO]) ,
'S_SPL_QMR_DO_WEEKLY_2024_F'[DEPARTURE_YEAR]=YEAR(TODAY()) ,
-------'S_SPL_QMR_DO_WEEKLY_2024_F'[Year]=2023 ,
--------'S_SPL_QMR_DO_WEEKLY_2024_F'[TOUR_STATUS_KEY]=7 ,
'S_SPL_QMR_DO_WEEKLY_2024_F'[QT_EXCLUDE_FLG]=0 ,
'S_SPL_QMR_DO_WEEKLY_2024_F'[TOUR_TYPE_KEY] IN VALUES(M_TOUR_TYPE_D[TOUR_TYPE_KEY]) ,
'S_SPL_QMR_DO_WEEKLY_2024_F'[TERMINATION_DATE_KEY] In VALUES(M_DATE_D[DATE_KEY]),
 'S_SPL_QMR_DO_WEEKLY_2024_F'[DEPARTURE_MONTH_KEY]<=MONTH(TODAY())
)


But for this it it required week selection manually in filter pane.But It should dynamically change the week number after refreshed....please help me out of this.

 

2 REPLIES 2
v-nuoc-msft
Community Support
Community Support

Hi @DanduMani104

 

Based on your description and screenshots, I can't understand your needs very well. Can you provide your PBIX file? So that I can help you better. Please remove any sensitive data in advance.

 

Regards,

Nono Chen

DanduMani104
Helper III
Helper III

Please reply team

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors