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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Rakesh_508
Helper I
Helper I

undefined

I have a table with two columns i.e., period which has Day, Month, Week,Quarter, Year and other column is frequency which is number.

Rakesh_508_0-1712069901761.png

 

If the period column has D and frequency 1, then as the output 365 records should come like 
D   1    1
D    1    2

.

.

D     1     365

D      7     1

.

D      7      52

 

we will be having 365 days in a year, 52 weeks in a year,12 months in a year,4 quarters in a year.

 

In the picture , I had selected pro_period is D i.e., D is referred as Date, W is weekly , M is month.. 

respectively in the table visual , first row D has 1 value, 2nd row D ha 7 value like so on...

D has 1 value that means we need to generate 365 rows because of 365 days will be there in a year.

like wise if D has 7 value that means we need to generate 52 rows because 52 weeks will be there in a year.

If has D has 8 value that means we need to generate 45 rows. if  D has 21 then 17 rows has to be generated...

 

The same procedure follows for M , W, Y also...

 

Hope you got the requirement. 

 

Solution for the requirement will be appreciated.


Need help on this..

2 REPLIES 2
Anonymous
Not applicable

Hi, @Rakesh_508 

Based on your description, I've created the sample data:

vjianpengmsft_0-1712117589562.png

First of all, I created an index column to sort by the same period and the same frequency:

vjianpengmsft_1-1712117686706.png

vjianpengmsft_2-1712117719320.png

I use the following DAX expression to get the column of the expected result:

rank =
RANKX (
    FILTER (
        ALLSELECTED ( 'Table (2)' ),
        'Table (2)'[PPO_FREQ] = EARLIER ( 'Table (2)'[PPO_FREQ] )
    ),
    'Table (2)'[Index],
    ,
    ASC
)

 Here are the results:

vjianpengmsft_3-1712118026422.png

I've provided the PBIX file used this time below.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

Hello @Anonymous 

 

Thanks for the reply..

 

This is not the solution which I am expecting.

 

we will be having 365 days in a year, 52 weeks in a year,12 months in a year,4 quarters in a year.

 

In the picture , I had selected pro_period is D i.e., D is referred as Date, W is weekly , M is month.. 

respectively in the table visual , first row D has 1 value, 2nd row D ha 7 value like so on...

D has 1 value that means we need to generate 365 rows because of 365 days will be there in a year.

like wise if D has 7 value that means we need to generate 52 rows because 52 weeks will be there in a year.

If has D has 8 value that means we need to generate 45 rows. if  D has 21 then 17 rows has to be generated...

 

The same procedure follows for M , W, Y also...

 

Hope you got the requirement. 

 

Solution for the requirement will be appreciated.

 

Thanks.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.