Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
BI_Dev
Creator II
Creator II

Set Analysis

Hi - I have tried below 2 expressions.

1.sum(Aggr(Sum({<[Period]= {'P3'}>}([Area]/[Total Area])*Time), Key))

2.sum(Aggr(Sum({1<[Period]= {'P3'}>}([Area]/[Total Area])*Time), Key))

I want to lock the value to P3 meaning any period is selected from the list I dont want the value to change but as of now if I select other periods value goes to 0.

Any thoughts please ?

 

 

Labels (3)
1 Solution

Accepted Solutions
Nicole-Smith

You probably need to put the set analysis in both of the sum() functions:

sum({<[Period]= {'P3'}>}Aggr(Sum({<[Period]= {'P3'}>}([Area]/[Total Area])*Time), Key))

View solution in original post

5 Replies
Nicole-Smith

You probably need to put the set analysis in both of the sum() functions:

sum({<[Period]= {'P3'}>}Aggr(Sum({<[Period]= {'P3'}>}([Area]/[Total Area])*Time), Key))

BI_Dev
Creator II
Creator II
Author

Its not working...out put is 0.

Nicole-Smith

Can you post a sample file?  Can't tell what's happening without seeing the document...

rogerpegler
Creator II
Creator II

Are you selecting from the field "Period" or another field that also represents the period?  If the latter you'll need to exclude it in your set analysis ie OtherField=

What happens with the inner Sum - does it evaluate properly when selecting the period?

Is your data model and data complete such that selecting a period links to all the data fields and nothing is missing?  For example if there is no Time for your selected period then the expression will return 0.

BI_Dev
Creator II
Creator II
Author

I had the wrong field.This worked.Thank you much.