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
CHFarver
Frequent Visitor

Hot to filter based on the date is the same for 2 columns

Hi guys,

I have an issue, where I have the following Clustered Column Chart:

Capture.PNG

The issue here is, that I don't want it to show (Blank) nor 2022 Qtr1, since these results are simply not right.
Blan kis easy to filter out by using the basic filters and deselect it in for example Date - Month:


Capture2.PNG

But since this report will continue to get new info in each month, I can not "hard code" the removal of january of 2022. I need it to be dynamic. The reason why it is showing it, is because it is based on the following measure:

Portfolio Growth = Calculations_Advanced[Current Portfolio Value] - [Prev Month Total Portfolio Value] - Calculations_Basic[Total Capital Contributions]

 

Which is based on these measures:

Calculations_Advanced[Current Portfolio Value] =

VAR _max = EOMONTH(MAXX(ALLSELECTED(FACT_Investments), FACT_Investments[Date]), 0)
RETURN
CALCULATE(Calculations_Basic[Total Portfolio Value],
FILTER(DIM_Dates, EOMONTH(DIM_Dates[Date], 0) = _max)
)
 
Prev Month Total Portfolio Value = CALCULATE(Calculations_Advanced[Current Portfolio Value], DATEADD(DIM_Dates[Date], -1, MONTH))
 
Total Capital Contributions = SUM(FACT_CapitalContributions[ContributionAmount])
 
I have the following data model:
Capture3.PNG
 
With these 2 tables:
Capture4.PNGCapture5.PNG


Basically, what I want is, that I want to show actual growth by month, quarter and year.
But since the FACT_Investments table has not been updated yet (will be at the end of january), the visual should not show this until there is lines (a hit) in the FACT_Investements table.


So I guess what I want is some sort of filter, where we can say, that the date the visual is filtered on (DIM_Dates[Date]) needs to be equal to a date in the FACT_Investments-table (FACT_Investments[Date]). Is that possible or what can I do?

 

Thanks in advance.

1 ACCEPTED SOLUTION
CHFarver
Frequent Visitor

Figured it out myself.
I created a new Calculated Column called IsCurrentMonth. The values in here was/is either Yes or No. 
And then I just filtered on No. 

This way I will never get the data of the current month, and I will update last day in each month.
So when ever we get to february 1st, the values that I have retrieved on january 31st will be visible.

View solution in original post

1 REPLY 1
CHFarver
Frequent Visitor

Figured it out myself.
I created a new Calculated Column called IsCurrentMonth. The values in here was/is either Yes or No. 
And then I just filtered on No. 

This way I will never get the data of the current month, and I will update last day in each month.
So when ever we get to february 1st, the values that I have retrieved on january 31st will be visible.

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.