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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AnandNamburi
Helper III
Helper III

How to get rid of row context in below scenario

Hi All,

 

I have a date column which is in the format "Date/Time(General Format) and I have converted it to "Custom Format" like (mmm-yy).

When I drag and drop the date column it was displaying Jan-19 or other values by datewise(taking row context), I need it like when I drag and drop it should display jan-19,feb-19,mar-19 like wise.

 

 

Thanks,

Anand

 

1 ACCEPTED SOLUTION

@AnandNamburi ok. since you are changing only the format of the order date, it is showing only month and year. in this case, i would suggest you to add another column in your table like below

 
Month_Year = FORMAT('Calendar'[Date],"MMM-YY")
 
and then use this column in your visual. this will aggreate data at month and year level.
hope this is what you want here. thanks



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

View solution in original post

9 REPLIES 9
negi007
Community Champion
Community Champion

@AnandNamburi in this case, you need to sort the data in your table. that will ensure that your order is same everywhere. see below screenshot on how to sort by column

 

negi007_0-1632125516137.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

I have sorted it as you said but in filters it is not working as expected. See screenshots below.

AnandNamburi_0-1632126753045.png

AnandNamburi_1-1632126774620.png

 

 

negi007
Community Champion
Community Champion

@AnandNamburi can you please share some example or screenshot of your expected output to help you on this.




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Sure.

 

AnandNamburi_0-1631797312559.png

 

Underlying data of this column remains the same as DateTime if you only change its format instead of recalculating the values.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

@AnandNamburi ok. since you are changing only the format of the order date, it is showing only month and year. in this case, i would suggest you to add another column in your table like below

 
Month_Year = FORMAT('Calendar'[Date],"MMM-YY")
 
and then use this column in your visual. this will aggreate data at month and year level.
hope this is what you want here. thanks



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

It worked Thanks. But when I'm dipsplaying the newly created column it is of data type text and it is storing from "A-Z".

Is there any that that I can sort it like earliest month and eraliest year.

 

Like Jan-21, Feb-21, Mar-21 e.t.c 

 

AnandNamburi_0-1631882450373.png

Thanks,

Anand

@AnandNamburi you can sort you table by month. in the below link you can find solution

 

https://community.powerbi.com/t5/Desktop/sorting-a-date-table-chronologically/td-p/280635

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

@negi007 this works good in a visualization as I can sort the data on required column. But when I kept the column Month Year in filters it is behaving same. In filter sort options we have AtoZ or ZtoA, no option to select any column specifically. Do we have any workaround for this.

AnandNamburi_0-1632124561666.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.