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
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
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.

Top Solution Authors
Top Kudoed Authors