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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
cristianml
Post Prodigy
Post Prodigy

Count quantity of months based on value

Hi,

I need to count the quantity of months that I have to the end of the model.

 

This a measure that calcules a value based on the category. 

=CALCULATE(SUM(FT_Forecast[Amount]),FILTER(FT_Forecast,[Category]="Solution Contingency"))

 

There is another column with date and what I need is to calculate the remaining months that contains this value/measure.

 

Any ideas ?

 

Thanks !

2 REPLIES 2
edhans
Super User
Super User

Please provide some data for us to work with with expecte results. I suspect either LASTDATE(), LASTNONBLANK(), or LASTNONBLANKVALUE() will be in the solution, but I'm not going to mock up fake data and try to guess what your data and needs actually are. If I have some test data to work with, I can assist.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi @edhans

 

I hope this can help.:

 

As you see here I need 3 Measures that can calculate:

Count of months:  Count the quantity of months that contains amount in the category "Solution Contingency". In the example below we have only 5 months with amount of that category. 

SC Last date:  Calculate the last month that contains amount in that category. Example > Feb 2021

Last date: the last date of the model. Example > June 2021

 

TABLE SC.jpg 

Thanks !

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors