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
BossCo
Helper II
Helper II

Part of total measure.

Hi everyone!

 

I have got a column named "total sales" and another one called "sales on offer". I created a third calculated column "Sales not on offer" = Total sales - Sales on offer.


How I could show the total and filter them by offer/non offer using slicers or visuals? Is there a way?

Thanks a lot!

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

Hi @BossCo 

Create a slicer table with two rows"offer", "non offer",

Capture14.JPGCapture15.JPG

Create a measure

Measure =
VAR non_offer =
    SUM ( 'Table'[sales] ) - SUM ( 'Table'[sales on offer] )
RETURN
    IF (
        SELECTEDVALUE ( 'slicer table'[slicer] ) = "offer",
        SUM ( 'Table'[sales on offer] ),
        non_offer
    )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

xx

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @BossCo 

Create a slicer table with two rows"offer", "non offer",

Capture14.JPGCapture15.JPG

Create a measure

Measure =
VAR non_offer =
    SUM ( 'Table'[sales] ) - SUM ( 'Table'[sales on offer] )
RETURN
    IF (
        SELECTEDVALUE ( 'slicer table'[slicer] ) = "offer",
        SUM ( 'Table'[sales on offer] ),
        non_offer
    )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

xx

Great, thanks a lot

amitchandak
Super User
Super User

You should able to create a filter

IF(isblank(sales on offer) ||  sales on offer=0, "Not on Offer","On Offer")

For rest please provide an example

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks. 

 

Hi, I'm not able to do this because I have some records which are not blank both for offer and non offer. For Instance, a product that has been sold not on offer at the beginning of the day, and then on offer from a certain moment on.

 

Product      Sales        Sales on offer

 

A                 15€         0€

B                  6€          6€

C                  10€        4€

 

Thanks

 

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.