Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I need to reference the number of days from a calendar table to a measure.
The data model looks like this
Data is like this
Employee:
Employee | TeamID |
ABC | 1 |
DEF | 1 |
GHI | 2 |
JKL | 3 |
Teams
TeamID | Team Name |
1 | Team A |
2 | Team B |
Calendar - standard calendar table
The visual is like thisThe value in the Matrix is a simple day count, and the matrix table is ignoring the "Team Name" slicer.
DayCount = CALCULATE(COUNTA('Calendar'[Date]))
I simplified it a bit but was really looking to reference the Calendar table for further calculations.
I understand that since the employee table and calendar table have no direct relation, it is repeating the values. But, is it possible to filter using the selected values from the Team slicer going to the matrix? So, the matrix would only show, Employees from Team A, or whichever is selected from the Team Name Slicer
Many thanks
Solved! Go to Solution.
= IF( NOT ISEMPTY( EMPLOYEE ), COUNTROWS( 'Calendar' ) )
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
= IF( NOT ISEMPTY( EMPLOYEE ), COUNTROWS( 'Calendar' ) )
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Thank you that worked! It took me almost a whole day, searching and figuring out solutions, It looks so simple in hindsight.
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |