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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Revealer
Frequent Visitor

Financial Year week sort

In matrix visual Fiscial year week number currect weeknumber have display first in order.

kindly help me i am getting asc,desc order only like 1-52,52-1 it is displaying

2 REPLIES 2
Revealer
Frequent Visitor

Hi,

   when i am using the below code means order is coming like thisScreenshot (61).png

 

but have to display order like this(eg)38,37,36

MAwwad
Solution Sage
Solution Sage

 

To display the current week number first in a matrix visual in Power BI, you can use a calculated column to identify the current week and then sort the matrix visual by this column.

Here is an example of how you could create a calculated column to identify the current week:

  1. Click on the "Modelling" tab in the ribbon and select "New Column" from the "Columns" dropdown.

  2. In the "New Column" window, enter a name for the calculated column, such as "Current Week".

  3. In the "Formula" field, enter a DAX expression to identify the current week. For example, you could use the WEEKNUM function to determine the week number for the current date, and then use the IF function to check if the week number is equal to the current week number.

    Here is an example of a DAX expression that you could use:

     

    Copy code
    Current Week = IF(WEEKNUM(TODAY()) = WEEKNUM([Date]), 1, 0)
     

    This expression will return a value of 1 for the current week and 0 for all other weeks.

    To sort the matrix visual by the calculated column, click on the "Sort By Column" option in the Visualizations pane and select the "Current Week" column as the sort column. Set the sort order to "Descending" to display the current week first.

    I hope this helps! Let me know if you have any further questions or if you need further assistance.

  4.  

  5.  

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors