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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
al1981
Helper II
Helper II

Challenge with Month-Year filtering/order without creating new

If I am correct, this is more specific to Power Pivot (where my data are located) and not PBI where this maybe is not issue.
I have dim table "plan per employee" for each quarter. In this plan, I would like to count added new customers to the the plan during quarter and to show it per employee by quarter/by month by correct month order. Issue I have, and don't know how to bypass it without to create new dim table with Month-Year (I already have one dim Month-Year which is filtering dim Date for many other calculation and cannot filter "plan per employee with active connection):
How would I be able to count added customers per quarter and show it in correct month order with the already created Monht-Year table? Once I created new DimTable Month-Year I can simply do OrderB in data model and as this table directly filter "plan per employee" I don't have any issues. Would this somehow be possible with already existing "old" Month-Year table with inactive connection in order to decrease number of Dim Tables?
for now I have simply calculation COUNTA([DateAdded]), i tried with some DAX, but i am lost... Thank you to anyone who could help me out...

 

 

 

al1981_0-1726670854470.png

 

1 ACCEPTED SOLUTION
dharmendars007
Super User
Super User

Hello @al1981 , 

 

1. For getting the right moth order,  If your Month-Year is stored as a text (e.g., "Jan 2023", "Feb 2023"), and it’s not ordering correctly, you can use the SORTBYCOLUMN feature in your model. Ensure your Month-Year column is sorted by an integer field such as a Month-Year Index (e.g., "202301", "202302"). This can ensure proper chronological sorting.

2.  Using this measure you can re-activate the relationship between Dates table and Plan table CALCULATE(COUNTA('PlanTable'[DateAdded]),USERELATIONSHIP('DimDate'[MonthYear], 'PlanTable'[MonthYear]))

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

View solution in original post

2 REPLIES 2
al1981
Helper II
Helper II

Dear @dharmendars007 

 

THANK you! Yes, i was playing wiht similar... but now it obivous how green i am 🙂 Thank you, its great! I assume i simple ignor message "Relationship between tables migh be needed" ....

dharmendars007
Super User
Super User

Hello @al1981 , 

 

1. For getting the right moth order,  If your Month-Year is stored as a text (e.g., "Jan 2023", "Feb 2023"), and it’s not ordering correctly, you can use the SORTBYCOLUMN feature in your model. Ensure your Month-Year column is sorted by an integer field such as a Month-Year Index (e.g., "202301", "202302"). This can ensure proper chronological sorting.

2.  Using this measure you can re-activate the relationship between Dates table and Plan table CALCULATE(COUNTA('PlanTable'[DateAdded]),USERELATIONSHIP('DimDate'[MonthYear], 'PlanTable'[MonthYear]))

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.