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

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.

Reply
PradeepDive
Helper II
Helper II

How to ignore column context in calculate dax measure

Hi,

I have three tables as below

1)  Calenader =  Simple Calendar table with dates

2)  ResourceTime = This table has resource time details by date  with details like [Resource ID], [Trans Date]  and [Hours]

3)  Resource Target = This table has resource targets with details like [Resource ID] and [Target] 

 

Relationship between table is   

[Calender]  1             ---->  * [ResourceTime]  on Date

[Resource Target] 1  ---->  * [ResourceTime]  on Resource ID

 

In table format it is like below

Resource IDTrans DateHours
1000101/01/218
1000101/15/218
1000103/02/215
1000303/15/212

 

Resource ID Target
1000135%
1000225%
1000362%

 

I am trying to create a matrix table where the row has resource ID from Resource Time and Target from Resource Target as value

Column is from Calendar table as Month which gives me something like below

 

 JANFebMarApr
1000135% 35% 
10003  62% 

 

Its showing me Targets only for months where Hours table has some hour.  I want it to shows it for all the months irrespective hours table has hours or not.

 

I am using a measure like below 

 

Resource Target =  

  Var target = selectedvalue(ResourceTime[Resource ID])

Return

  Calculate ( Max(Resource Target[Target]), 

       Filter(Resource Target, Resource Target[Resource ID] = target) ) 

 

Is there a way the measure can ignore date context and give me target for all months.

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @PradeepDive ,

 

This is the desired result you want.

 

Measure =
CALCULATE (
    SUM ( 'Resource Target'[ Target] ),
    ALLEXCEPT ( 'Resource Target', 'Resource Target'[Resource ID] )
)

 

26.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @PradeepDive ,

 

This is the desired result you want.

 

Measure =
CALCULATE (
    SUM ( 'Resource Target'[ Target] ),
    ALLEXCEPT ( 'Resource Target', 'Resource Target'[Resource ID] )
)

 

26.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.