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

Calculated Column - using it as a slicer for total (aggregated) values

Hello  -  The picture below illustrates my issue.  

 

I have a slicer on my page and my idea is that I want it to filter all orders with a TOTAL value of more than, or less than, $100k.  

 

Instead, what it is doing is filtering orders that have order lines less than a $100k  -  which is not what I want.   I want the slicer to filter the orders based on the order's total value, not the individual line value.   Any suggestions?

 

texmexdragon_0-1639460549092.png

 

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

Hi @Anonymous ,

According your provided,I feel you want to create a new column base on table :

Over_Under$10K = 
VAR SUM1 =
    CALCULATE (
        SUM ( 'Table'[Order Value] ),
        FILTER ( 'Table', 'Table'[Order Number] = EARLIER ( 'Table'[Order Number] ) )
    )
RETURN
    IF ( SUM1 < 100000, "LESS $10K", "Over $10K" )

Final output:

vluwangmsft_0-1639709192047.png

vluwangmsft_1-1639709201779.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

According your provided,I feel you want to create a new column base on table :

Over_Under$10K = 
VAR SUM1 =
    CALCULATE (
        SUM ( 'Table'[Order Value] ),
        FILTER ( 'Table', 'Table'[Order Number] = EARLIER ( 'Table'[Order Number] ) )
    )
RETURN
    IF ( SUM1 < 100000, "LESS $10K", "Over $10K" )

Final output:

vluwangmsft_0-1639709192047.png

vluwangmsft_1-1639709201779.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@Anonymous , You need to create a measure like example

 


Measure =
var _sum = calculate(sum('Table'[Orader_value]))
var _1 = Switch (selectedvalues(Slicer[Slicer]) ,
"Less Than 100K", 100000,
"Less Than 200K", 200000,
500000
)
return

Sumx ( filter(values( 'Table'[Order Number]), _sum<_1 ),_sum)

 

 

or refer to dynamic segmentation

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

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.