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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors