Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have two tables. One table is my Calendar Table, the other table is my Data table, and they are both related by 1-* on a Date column. I need to create a dynamic count of rows in the Data table as long as the date on which that event occurred is marked as a "Work-Day" in the Calendar Table. I want to create a measure to accomplish this but cannot figure out how to do so without resorting to CALCULATE, which does not dynamically update when selections are made on the various visuals on the canvas.
With the data below, the count should be 1.
Calendar
Date Category
1/1/2019 Off
1/2/2019 Off
1/3/2019 Work-Day
Data
Date Event
1/1/2019 Holiday
1/2/2019 Holiday
1/3/2019 Conference
Solved! Go to Solution.
Hi @Anonymous
Create a measure
Workday Count = CALCULATE( COUNTROWS( Data ), 'Calendar'[Category] = "workday" )
If it doesn't meet your needs, please tell me your expected result.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Create a measure
Workday Count = CALCULATE( COUNTROWS( Data ), 'Calendar'[Category] = "workday" )
If it doesn't meet your needs, please tell me your expected result.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
What are you doing to make it not "dynamically update"? I'd have thought either a calculate countrows of your data table where the related value is work-day ought to work, either that or just join in the category column into your data table in Power Query and then not use the calendar table at all?
@Anonymous try this measure
Workday Count = CALCULATE( COUNTROWS( Data ), 'Calendar'[Category] = "Work-Day" )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |