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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mwolfc
Frequent Visitor

Convert a DAX measure

Hello, well, after 4 hours of research and Chat GPT, it's time to ask my Forum friends!  

Question:  I have a DAX measure which I'm using in a card visual, which gives a count of records, and it works great.  

<CountWalksInPreviousWeek =
CALCULATE(
    COUNTROWS('Booked Sales'),
    FILTER(
        'Booked Sales',
        'Booked Sales'[QW Date] >= (TODAY() - WEEKDAY(TODAY(), 2) - 6) && 'Booked Sales'[QW Date] <= (TODAY() - WEEKDAY(TODAY(), 2))
    )
)>
It counts the number of rows containing QW Dates occuring over the previous Mon-Sun period.  
Now, for a drill-own visual I want to modify this measure into a new measure that will list out these filtered dates, and also list 2 other fields with values from those rows.  The new field names are "Job Name" and "Customer".  Everything I have tried today has failed me.  Thanks so much!
1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @mwolfc you already have rows, if your measure works as expected 🙂

In your measure, filter part will give your "rows"

Put this into calculated table and you will have it.

 

FILTER(
'Booked Sales',
'Booked Sales'[QW Date] >= (TODAY() - WEEKDAY(TODAY(), 2) - 6) && 'Booked Sales'[QW Date] <= (TODAY() - WEEKDAY(TODAY(), 2))
)

 

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
some_bih
Super User
Super User

Hi @mwolfc you already have rows, if your measure works as expected 🙂

In your measure, filter part will give your "rows"

Put this into calculated table and you will have it.

 

FILTER(
'Booked Sales',
'Booked Sales'[QW Date] >= (TODAY() - WEEKDAY(TODAY(), 2) - 6) && 'Booked Sales'[QW Date] <= (TODAY() - WEEKDAY(TODAY(), 2))
)

 

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Thank you so much for the suggestion!  I simply dragged that measure into the drill-down report and it worked perfectly!  

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors