cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Anonymous
Not applicable

## Rank by Quarters solution

Dear all,

I would like to ask for your help on the below.  I would like to rank by months and Quarters.  I could do it for the months with the below formula. There are 2 different Tables the one with the amount and the one with the dates. But I have the dates on both tables if that helps(its connected with another table).

Rank = RankX(ALLSELECTED('Date'[Month/Yeart]); Calculate(SUM((('data-Table'[Amount])))))

But for the Quarter it does not work! i tried to do that but it appears only 1

RankQ = RANKX(ALL('Date'[Month/Yeart].[Quarter]);CALCULATE(sum('Data-Table'[Amount])))

the data source that I input is like below:

Date                        Amount       Type
01/01/2019              45.353.180    Gross Profit
01/02/2019              44.644.460    Gross Profit
01/03/2019              43.890.506    Gross Profit
01/04/2019              43.831.750    Gross Profit
01/05/2019              42.363.979    Gross Profit
01/06/2019              41.529.047    Gross Profit

Another solution that I thought is to create it with the below app.

But my problem here is that If i put in Thousands it does not appear the dots on the correct spot.

Let me know if you have any from the 2 solutions or if you need further info.

1 ACCEPTED SOLUTION
Employee

Hi @Anonymous,

1. Create columns for [Year] and [Quarter] in the date table.

2. Create a measure.

```ranks 2 =
RANKX (
ALL ( 'Date'[Year], 'Date'[Quarter] ),
CALCULATE ( SUM ( Table1[Amount] ) ),
,
,
SKIP
)
```

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Employee

Hi @Anonymous,

1. Create columns for [Year] and [Quarter] in the date table.

2. Create a measure.

```ranks 2 =
RANKX (
ALL ( 'Date'[Year], 'Date'[Quarter] ),
CALCULATE ( SUM ( Table1[Amount] ) ),
,
,
SKIP
)
```

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It worked!

Thank you very much!!!

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors