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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.