- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

# How can I calculate the difference of scores between previous quarter and current quarter

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-06-2018 05:30 AM

Date | Category | Score |

01-01-2016 | A | 3 |

01-01-2016 | B | 2 |

01-01-2016 | C | 4 |

04-04-2016 | A | 2.5 |

04-04-2016 | B | 2.5 |

04-04-2016 | C | 4 |

08-08-2016 | A | 2 |

08-08-2016 | B | 3 |

08-08-2016 | C | 2 |

12-12-2016 | A | 3 |

12-12-2016 | B | 3 |

12-12-2016 | C | 3 |

02-02-2017 | A | 3 |

02-02-2017 | B | 2 |

02-02-2017 | C | 4 |

06-06-2017 | A | 3.5 |

06-06-2017 | B | 2 |

06-06-2017 | C | 2.5 |

In this table contain quarterly scores of different categories. How can i calculate the difference between previous quarter and current quarter in a calculated column.

Solved! Go to Solution.

Accepted Solutions

## Re: How can I calculate the difference of scores between previous quarter and current quarter

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-07-2018 01:02 AM

I got the Dax query. Below query works for me.

CurrentQuarterScore-PreviousQuarterScore = VAR currentQuarterScore = CALCULATE ( SELECTEDVALUE ( Table1[Score] ) ) VAR selectedCategory = SELECTEDVALUE ( Table1[Category] ) VAR previousQuarterScore = CALCULATE ( SUM ( Table1[Score] ), ALLEXCEPT ( Table1, Table1[Category] ), PREVIOUSQUARTER ( Table1[Date] ) ) VAR difference = CALCULATE ( currentQuarterScore - previousQuarterScore ) RETURN difference

All Replies

## Re: How can I calculate the difference of scores between previous quarter and current quarter

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-06-2018 09:48 PM

Hi @nandukrishnavs,

You can create a calculated column below:

Qiuyun Yu

If this post

**helps**, then please consider

**to help the other members find it more quickly.**

*Accept it as the solution*## Re: How can I calculate the difference of scores between previous quarter and current quarter

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-06-2018 11:50 PM - edited 12-07-2018 12:00 AM

## Re: How can I calculate the difference of scores between previous quarter and current quarter

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-07-2018 01:02 AM

I got the Dax query. Below query works for me.

CurrentQuarterScore-PreviousQuarterScore = VAR currentQuarterScore = CALCULATE ( SELECTEDVALUE ( Table1[Score] ) ) VAR selectedCategory = SELECTEDVALUE ( Table1[Category] ) VAR previousQuarterScore = CALCULATE ( SUM ( Table1[Score] ), ALLEXCEPT ( Table1, Table1[Category] ), PREVIOUSQUARTER ( Table1[Date] ) ) VAR difference = CALCULATE ( currentQuarterScore - previousQuarterScore ) RETURN difference