Forum Discussion
Help on Context Transition
Hi
I have a table as shown below. TLeavesUnit is a Calculated Column and the report is working fine. When I add a measure in the matrix for each staff, I have a multitude of irrelevant rows being populated.
I would like to add the measure ( in red below) Expected Work Units, then another measure which is the sum of this measure and TLeaves Units ( a calculated Colunmn), keepimg only these 5 records shown.
I am having all these records diplayed
I do not know why these records are shown. Please help me., been struggling with Calculate, KeepFilters etc, but cannot get it to work. Many Thanks
Jaweed_L
10 Replies
- Jai-RathinavelSuper User
Jaweed_L Can you show the DAX used for Expected Work Units and TLeave Units ?
- Jaweed_LNew Member
Thank you fotr your mail.
Expected Work Units = ('Calendar'[Days Between] - SUM( 'Calendar'[Sats And Suns]) - SUM( 'Calendar'[Public Holidays])) * 75Basically it reads a calendar table, where Saturdays/Sundays/Public Holidays have been flagged. It gets the no of days between the dates selected and minus the non working days, then multiply by 75 ( in 1 day staff is expected to work 75 units) to compute the expected work units. This is working fine.TLeaves is a calculated column, each time a staff records units against code of T leaves, the units are pushed in the T leaves column,Even by defining a simplistic measure egTest Measure = 2, and inserting it in the pbi matrix, unwanted records will come out.If I remove the measure from the matrix, only required records will be display, which is correct.Thanks to advise me.Jaweed- Jai-RathinavelSuper User
Jaweed_L I believe this is happening because you have created "Expected Work Units" measure on a calendar table and pulling it against the Fact Table. Try a visual level filter like TLeave Units is not blank or make the relationship between calendar and fact table bidirectional but it is not advisable. To resolve this you have to create the measure for the Expected Work Units based on both the Fact Table date column and Calendar Date column.