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
yellow43
Helper I
Helper I

Adding a FILTER to a report less than a value and don't SUM columns

Hello Community,

 

I have a report with a table (below image) that shows Products and sales for each day

I have created a measure to calculate the sum of all sales for each product:

 

Total Sales = SUM(Table[Sales_Invoice])

yellow43_0-1659394336840.png

In this table I have applied a filter to show only the product that have less than 100 units sold.

For 1 day it works fine, but if the range of dates is more than 1, the behaviour is that it sums the units of the dates.

 

Thank you in advance for your help.

1 ACCEPTED SOLUTION

HI,

Please check the attached file. Or, please share your sample pbix file's link here and then I can try to look into it.

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @yellow43 ,

Here are the steps you can follow:

1. Create calculated column.

Month =
FORMAT('Table'[Date],"dd")
&"/"&
FORMAT('Table'[Date],"mmm")

2. Create measure.

Sum_Measure =
var _sum=
CALCULATE(
    SUM('Table'[Qty Sold]),FILTER(ALL('Table'),
    'Table'[Product]=MAX('Table'[Product])&&
    'Table'[Month]=MAX('Table'[Month])))
    return
IF(
_sum>=100,BLANK(),_sum)

3. Result:

vyangliumsft_0-1659601113079.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

The below is finding quantity that is lower than 100 per day per product.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your dataset.

 

Untitled.png

 

Quantity less than 100 per day: =
CALCULATE (
    [Quantity measure:],
    FILTER (
        SUMMARIZE ( Data, 'Product'[Product], 'Calendar'[Date] ),
        [Quantity measure:] < 100
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hello @Jihwan_Kim

Thank you for your help! But I have not explained well.

Please see the image with desired output

2022-08-02_23h34_30.png

HI,

Please check the attached file. Or, please share your sample pbix file's link here and then I can try to look into it.

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.

Top Solution Authors