Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Ninna
Frequent Visitor

How to group data and connect them to date slicer from the initial data

Hi everyone,

 

I need some help.

I have a sales table by date, customer, ect. I need to create group (range) based on the sum of sales for customers and campaigns.

The problem is that I dont't know how to connect the table by ranges to timline based od date in my data.

 

Here is the example of what I need. I have the table on the left and I need to get the report looking like the table on the right(that needs to be sensitive on timeline).

 

Ninna_1-1675778515454.png

 

Tnx. 

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Ninna 

you would need a range table like:

RangeMinMax
>150015019999
1000-150010011500
500-10005011000

0-500

0500

 

then plot the Range[Range] column with two measures like:

 

No of Customers = 
VAR _table =
ADDCOLUMNS(
    SUMMARIZE(
        Sales,
        Sales[Customer],
        Sales[Campaign]
    ),
    "Sales",
    CALCULATE(SUM(Sales[Sales]))
)
VAR _list =
CALCULATETABLE(
    SUMMARIZE(Sales, Sales[Customer], Sales[Campaign]),
    FILTER(_table, [Sales]>=MIN(Range[Min])&&[Sales]<=MAX(Range[MAX]))
)
RETURN 
COUNTROWS(_list)

Total Sales = 
VAR _table =
ADDCOLUMNS(
    SUMMARIZE(
        Sales,
        Sales[Customer],
        Sales[Campaign]
    ),
    "Sales",
    CALCULATE(SUM(Sales[Sales]))
)
RETURN
CALCULATE(
    SUM(Sales[Sales]),
    FILTER(_table, [Sales]>=MIN(Range[Min])&&[Sales]<=MAX(Range[MAX]))
)

 

 

it worked like:

FreemanZ_0-1675782325666.png

 

View solution in original post

2 REPLIES 2
Ninna
Frequent Visitor

That's it. Thank you 🙂

FreemanZ
Super User
Super User

hi @Ninna 

you would need a range table like:

RangeMinMax
>150015019999
1000-150010011500
500-10005011000

0-500

0500

 

then plot the Range[Range] column with two measures like:

 

No of Customers = 
VAR _table =
ADDCOLUMNS(
    SUMMARIZE(
        Sales,
        Sales[Customer],
        Sales[Campaign]
    ),
    "Sales",
    CALCULATE(SUM(Sales[Sales]))
)
VAR _list =
CALCULATETABLE(
    SUMMARIZE(Sales, Sales[Customer], Sales[Campaign]),
    FILTER(_table, [Sales]>=MIN(Range[Min])&&[Sales]<=MAX(Range[MAX]))
)
RETURN 
COUNTROWS(_list)

Total Sales = 
VAR _table =
ADDCOLUMNS(
    SUMMARIZE(
        Sales,
        Sales[Customer],
        Sales[Campaign]
    ),
    "Sales",
    CALCULATE(SUM(Sales[Sales]))
)
RETURN
CALCULATE(
    SUM(Sales[Sales]),
    FILTER(_table, [Sales]>=MIN(Range[Min])&&[Sales]<=MAX(Range[MAX]))
)

 

 

it worked like:

FreemanZ_0-1675782325666.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.