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
Anonymous
Not applicable

Slicing issue with a measure

Hi Community,

 

I have two dim tables- Datedim & Empdim. Empdim is related to two other tables. There is a measure 'Hrs Productivity' in empdim that I have on a matrix layout. This measure is not slicing the year/months properly: for example if 2021 is selected, the measure makes the data to be displayed for prior months/year.

Capture_103.PNG

 

Here is my Pbi file: https://1drv.ms/u/s!Ag919_pO_UKrgReCwuTjqZXdT9fW?e=HGZjvg

 

Many thanks in advance,

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , The issue is because you are using a measure from dimesion and that will not pass values to dim which are in parallel to same table

 

You can use a meausre like
maxx(Hrs_worked,RELATED('Emp Dim'[tHrs per month])

or this 
Measure = sumx(values(Hrs_worked[emp_code]),maxx(Hrs_worked,RELATED('Emp Dim'[tHrs per month])))

 

Basically you need make sure meaure or column belong to fact

 

 

Also refer these two video, they can help

https://www.youtube.com/watch?v=czNHt7UXIe8

https://www.youtube.com/watch?v=Wu1mWxR23jU

Anonymous
Not applicable

@amitchandak  thanks, I tried this before posting the question. It works in terms of correct slicing but doesnt work at measure level. The measure doesn't result values for all the conditions in the measure because the data in the two tables (relating to EMPdim) is from different sources.

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.