cancel
Showing results for 
Search instead for 
Did you mean: 
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors