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
Anonymous
Not applicable

Filter rows to adjacent column month

The following measure works fine when my matrix has 'Calendar'[Date Hierarchy] in the columns and 'sales'[Order Date] in the rows.  However, when I try to rever to the desired layout of 'Calendar'[Date Hierarchy] in the columns, and "Division" in the rows, the measure returns no values.

 

How can I return the same values from the first screenshot, but not have it be dependent on [Order Date] remaining in the matrix?

 

 

CountCompleteEstimate = 
CALCULATE(
    DISTINCTCOUNT(SalesHistory[SO]),
    FILTER(SalesHistory,SalesHistory[EstimateQuality]="Complete Estimate"),
    FILTER('Calendar','Calendar'[MonthInt]=SELECTEDVALUE(Sales[OrderDateMonthInt])
    &&'Calendar'[Year]=SELECTEDVALUE(Sales[OrderDateYear])
    )
)

 

 

Capture.PNGCapture2.PNG

Thanks in advance!

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Please update the formula of measure [CountCompleteEstimate] as below and check whether the matrix can display the data or not:

CountCompleteEstimate =
CALCULATE (
    DISTINCTCOUNT ( 'SalesHistory'[SO] ),
    FILTER ( 'SalesHistory', 'SalesHistory'[EstimateQuality] = "Complete Estimate" )
)

If the above one is not working, please share some sample data in SalesHistory, SalesCalendar table and your expected result with backend logic and special examples (exclude sensitive data) in order to provide you a suitable solution? Please also share the related relationship info(cardinality, direction etc.) if there is any relationship exist in these tables. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.