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
Anonymous
Not applicable

From Excel to Power BI

I want to do the similar or same thing from Excel to Power BI, but am struggling with it.

In Excel, there are 2 filters, which it intelligently combines the PARAMETER with the YEAR.

tan_thiam_huat_0-1653701045043.png

 

PARAMETERYEARJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDECAVG
TS201927.0127.3828.1328.9728.6828.1627.7627.8227.9828.3327.926.7327.9
TS202027.0627.3128.1328.6928.8527.9127.4227.4727.2227.4427.3326.827.64
TS202125.9426.2627.1728.0528.4527.827.3727.227.4827.7627.6626.9427.34
T2M201926.6926.9427.7328.6128.5827.8927.5927.6527.827.9127.626.3227.61
T2M202026.6726.8327.6328.1528.5727.627.0827.2926.9427.2626.8726.4127.28
T2M202125.5325.8126.7427.7628.1327.5727.1626.8327.1827.5227.3326.5627.01
T2MDEW201924.223.7223.624.3524.8724.9824.2924.0723.6923.5624.0124.1524.12
T2MDEW202024.1323.8724.2124.525.224.824.2624.6224.1924.3724.324.2724.4
T2MDEW202123.7423.1924.0124.1924.9224.5224.6124.3324.2824.3224.2824.4124.24
T2MWET201925.4425.3325.6626.4826.7326.4425.9425.8625.7525.7425.825.2425.87
T2MWET202025.425.3525.9226.3326.8826.225.6825.9625.5625.8225.5825.3425.83
T2MWET202124.6324.525.3725.9826.5226.0525.8825.5825.7325.9225.8125.4925.63
T2M_MAX201930.931.3432.3533.6332.3632.631.0831.4432.5832.4931.8830.1233.63
T2M_MAX202031.0531.1832.3632.6733.8731.1230.3930.4230.9730.9831.5630.0633.87
T2M_MAX202129.331.4531.5831.5131.9130.5730.0430.0132.1531.1731.1930.4432.15
T2M_MIN201923.862322.9824.2725.9825.4424.7324.7924.1324.5724.6323.6822.98
T2M_MIN202023.1423.3723.5824.8625.7325.2124.824.9324.325.0124.2623.4423.14
T2M_MIN202122.8121.8623.4825.2425.6325.0824.0824.5124.1624.7324.4823.9321.86

 

But I am not sure how it is possible with Power BI.

 

THANKS.

 

 

4 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Fantastic, this is what I am looking for, Thanks a million.. Power BI has lots of features, and I am learning all from the basic.

View solution in original post

You are welcome.  "Unpivot Other columns" changes thw wide dataset to a long one.

Please mark my original rely as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

On the Format icon in the visualisation pane, there is an option to switch the orientation to horizontal.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hi,

It is always recommended to create a Calendar Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

16 REPLIES 16
Anonymous
Not applicable

say based on the R code, which its data is imported into Power BI, is it sufficient to do the plot without additional table for the Calendar?

 

res = read.csv2(
paste0(
"https://power.larc.nasa.gov/api/temporal/monthly/point",
"?parameters=T2M,T2MDEW,T2MWET,TS,T2M_MAX,T2M_MIN",
"&community=RE",
"&longitude=103.9690",
"&latitude=1.3665",
"&format=CSV",
"&start=2019",
"&end=2021"
),
skip = 14,
sep = ","
)
res$ANN <- NULL

Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Fantastic, this is what I am looking for, Thanks a million.. Power BI has lots of features, and I am learning all from the basic.

You are welcome.  If my reply helped, please mark that as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

do you mind show me the Steps from the original data (wide) to what you have (long)?

Hi,

Please review all the steps shown in the Applied steps section of the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

fantastic...you are great. Do you mind explain the step on Unpivoted Other Columns?.. I think it is something like changing from wide to long...

You are welcome.  "Unpivot Other columns" changes thw wide dataset to a long one.

Please mark my original rely as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

sorry.. 2 more things: I have facing difficulties:

a) How do you get the order for the x-axis on the Month name to be Jan, Feb, Mar, ... Nov,Dec.

b) How do you get the PARAMETER to be in one row? Mine give me a check boxes in vertical column.

Anonymous
Not applicable

first issue is resolved... 2nd on the PARAMETER is not solved yet.

On the Format icon in the visualisation pane, there is an option to switch the orientation to horizontal.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Ashish_Mathur
is there anyway to show the visualization without the additional Calendar table?
based on the original table with the months and years, it is sufficient to do the visualization?

Hi,

It is always recommended to create a Calendar Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

got it, thank you.

Anonymous
Not applicable

thanks for your kind reply... I have added that new column. How do I display those months on the x-axis?

amitchandak
Super User
Super User

@Anonymous , You have to unpivot the months in power query

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Then you have to create a new column

Parameter year =[Parameter] & " " & [Year]

 

 

use this Parameter year  on axis and Month on legend and value on values/Yaxis 

Helpful resources

Announcements
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.