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

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

Reply
AlvaroLeonardoN
Frequent Visitor

Transform from quarterly to monthly Power bi

 

Hello everyone,

I appreciate your help, I am new to this, how do I transform the data from the "pay" column to the "incentive" variable that is quarterly to monthly? 

 

AlvaroLeonardoN_0-1709929346605.png

 

1 ACCEPTED SOLUTION
v-zhouwen-msft
Community Support
Community Support

Hi @lbendlin ,thank you for your quick reply, I thought of other options, the following are my additions.

Hi @AlvaroLeonardoN ,

The Table data is shown below:

vzhouwenmsft_0-1710494818808.png

Please follow these steps:
1. Use the following DAX expression to create a column named ‘Index’

Index = SWITCH([Month],
"Jan",1,
"Feb",2,
"Mar",3,
"Apr",4,
"May",5,
"Jun",6,
"Jul",7,
"Aug",8,
"Sep",9,
"Oct",10,
"Nov",11,
"Dec",12)

2. Use the following DAX expression to create a column

Column = 
VAR _a = 'Table'[Index]
VAR _b = _a - MOD(_a - 1,3)
VAR _c = CALCULATE(MAX('Table'[Pay]),FILTER('Table','Table'[Index] = _b))
RETURN 
IF(ISBLANK(_c),BLANK(),IF('Table'[Concept] = "Incentive",_c / 3 , 'Table'[Pay]))

3. Final output

vzhouwenmsft_1-1710494894599.png

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

View solution in original post

2 REPLIES 2
v-zhouwen-msft
Community Support
Community Support

Hi @lbendlin ,thank you for your quick reply, I thought of other options, the following are my additions.

Hi @AlvaroLeonardoN ,

The Table data is shown below:

vzhouwenmsft_0-1710494818808.png

Please follow these steps:
1. Use the following DAX expression to create a column named ‘Index’

Index = SWITCH([Month],
"Jan",1,
"Feb",2,
"Mar",3,
"Apr",4,
"May",5,
"Jun",6,
"Jul",7,
"Aug",8,
"Sep",9,
"Oct",10,
"Nov",11,
"Dec",12)

2. Use the following DAX expression to create a column

Column = 
VAR _a = 'Table'[Index]
VAR _b = _a - MOD(_a - 1,3)
VAR _c = CALCULATE(MAX('Table'[Pay]),FILTER('Table','Table'[Index] = _b))
RETURN 
IF(ISBLANK(_c),BLANK(),IF('Table'[Concept] = "Incentive",_c / 3 , 'Table'[Pay]))

3. Final output

vzhouwenmsft_1-1710494894599.png

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

lbendlin
Super User
Super User

You may not need to do that if the value is always divided by three.  In your monthly visuals, display a third of the quarterly value for each month.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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