Forum Discussion

Oded-Dror's avatar
Oded-Dror
Helper III
4 years ago
Solved

Convert Calculated Column to a measure

Hi there,

I have a table with Regions and Sales and Template Name (for sorting)
The Column Regions contain duplicate regions names associates with different sort orders this sort order attach to a slicer
so I created a calculated column looks like that

Total Sales by Region =
Calculate(Sum(Sales[Sales]),
Filter(Sales,
Sales[Regions] = EARLIER(Sales[Regions])))
This works fine because the calculated calumn group the sales by region regardless to the slicer selection.
How do I convert this calculated calumn to a measure that perform the grouping and ignore the slicer selection?
Thanks
Oded Dror
 
 
  • I solved the measure calculaion = 

    CALCULATE(
    SUM(Sales[Sales]),
    Filter(ALL(Sales),Sales[Regions] = SELECTEDVALUE(Sales[Regions])))

1 Reply

  • I solved the measure calculaion = 

    CALCULATE(
    SUM(Sales[Sales]),
    Filter(ALL(Sales),Sales[Regions] = SELECTEDVALUE(Sales[Regions])))