Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am very new to Power BI and this may seem a very basic question.
I have a FiscalMonth feild added to my dashboard but for some reason its showing the numbers of the months rather then the names,
Is it possible to change the numbers to names?
Thank you
Solved! Go to Solution.
Hi @ahsanlhcgov,
Do you want to display month names in the slicer and visual as shown in the following screenshot?
If that is the case, please click the Month column in the Field Pane, then select FiscalMonth after clicking “Sort By Column” under Modeling ribbon, there is an example for your reference. This way, you are able to achieve your requirement.
Thanks,
Lydia Zhang
Yes it is possible. u need to create calculated column for it
and use below measure
=format([Date],"MMM")
I am using a direct query which is not allowing me to use it.
my query is
FiscalMonth = if (month(vMyLHCStats[dtadded]) <4, month(vMyLHCStats[dtadded])+9 , (month(vMyLHCStats[dtadded])-3))
Function 'FORMAT' is not allowed as part of calculated column DAX expressions on DirectQuery models.
are u using tabular model?
I am quering SQL so i beleive it is a tabular model.
u mean u are connecting sql server db directly to Pbix using Directquery mode?
yes.
According to my knowledge i guess u wont be able to write any measure on direct query mode. So rather create a view and in that view you would be able to get names for Months
i have another view for months which does the same thing exactly but the problem why I cant use it is because the view is sorted alphabatically and I dont know how to change it according to the months in a year. If thats possible please let me know
You can use "Sort by" feature to sort the text month column with the numeric month column.
while importing data from a SQl Server database in Direct Query modde. there is an advanced options
where u can write sql query. can u try
select * from view order by MonthNum
Only other way that i know of is to use the sorting option in the visual. have u tried that ?
it only gives option to sort it in ascending and descending order. no good for me.
how do u want to sort then?
ur initial question was to convert month number to Month name,right?
is this another question?
i want to sort them from APRIL to MARCH. I ve got 2 views one is FiscalMonth and the other one is just Month.
when using the FiscalMonth the slicer on PB shows the months in numbers starting from 1-12 which is correct but due to direct query I cant change the names i.e I cant change 1 to JAN , 2 to FEB and so ON.
when using Month the slicer on PB shows the month names alphabatically i.e APRIL, AUGUST, JULY, JUNE
I hope this will give u a better idea.
Hi @ahsanlhcgov,
Do you want to display month names in the slicer and visual as shown in the following screenshot?
If that is the case, please click the Month column in the Field Pane, then select FiscalMonth after clicking “Sort By Column” under Modeling ribbon, there is an example for your reference. This way, you are able to achieve your requirement.
Thanks,
Lydia Zhang
that is perfect. thank you very much.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
157 | |
120 | |
74 | |
72 | |
63 |