Forum Discussion
Calculated Column removing filter context
- Anonymous3 years ago
Hi ryan_b_fiting ,
Please refer to my pbix file to see if it helps you.
Create relationships between tables.
Create a column.
Column = CALCULATE ( SUM ( 'monthly cost'[Cost] ), FILTER ( 'monthly cost', 'monthly cost'[wirelessnumber] = EARLIER ( 'Overview of Lines'[wirelessnumber] ) && 'monthly cost'[Bill Cycle Date] = EARLIER ( 'Overview of Lines'[Benchmark Cycle Date] ) ) )Or a measure.
Measure_RE = CALCULATE ( SUM ( 'monthly cost'[Cost] ), FILTER ( ALL ( 'monthly cost' ), 'monthly cost'[wirelessnumber] = SELECTEDVALUE ( 'Overview of Lines'[wirelessnumber] ) && 'monthly cost'[Bill Cycle Date] = SELECTEDVALUE ( 'Overview of Lines'[Benchmark Cycle Date] ) ) )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ryan_b_fiting ,
Please refer to my pbix file to see if it helps you.
Create relationships between tables.
Create a column.
Column =
CALCULATE (
SUM ( 'monthly cost'[Cost] ),
FILTER (
'monthly cost',
'monthly cost'[wirelessnumber] = EARLIER ( 'Overview of Lines'[wirelessnumber] )
&& 'monthly cost'[Bill Cycle Date]
= EARLIER ( 'Overview of Lines'[Benchmark Cycle Date] )
)
)
Or a measure.
Measure_RE =
CALCULATE (
SUM ( 'monthly cost'[Cost] ),
FILTER (
ALL ( 'monthly cost' ),
'monthly cost'[wirelessnumber]
= SELECTEDVALUE ( 'Overview of Lines'[wirelessnumber] )
&& 'monthly cost'[Bill Cycle Date]
= SELECTEDVALUE ( 'Overview of Lines'[Benchmark Cycle Date] )
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ryan_b_fiting3 years agoPost Patron
Thanks Anonymous the column worked as expected. The measure did not give me the expected output, but I am using the calculated column and it is working for me!
Thanks again for the assistance.