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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Tairo
Helper I
Helper I

Filtering and categorizing problem

I like to filter rows based on a value and create a pivot table of that selection.

For example:

Date Category Value
1/1/2018  Bananas     20
1/1/2018   Oranges    10
1/1/2018   Apples       30
1/1/2018   Oranges    15
1/1/2018   Bananas    10
2/1/2018   Apples      10
2/1/2018   Apples      20
2/2/2018   Bananas    25
2/3/2018   Oranges    15
2/4/2018 Bananas 20


The result for example bananas should be:

 

Date Category Value
1/1/2018    Bananas    30
2/1/2018    Bananas    45

The final goal that I like to achieve is that I can calculate the difference between actual and previous period (month) for each category.

Anybody knows how to do this?

Thanks, Arno

1 ACCEPTED SOLUTION

@Zubair_Muhammad, Thanks a lot for your help.
 
My problem is solved!
 
Tairo

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@Tairo

 

You can get previousMonth Values with a MEASURE like

 

PreviousMonthValues =
CALCULATE (
    SUM ( TableName[Values] ),
    PREVIOUSMONTH ( TableName[Date] ),
    ALLEXCEPT ( TableName, TableName[Date], TableName[Category] )
)

@Zubair_Muhammad, Thanks a lot for your help.
 
My problem is solved!
 
Tairo

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors