Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am trying to build a measure that contains a couple of variables, and I need the totals row to be the sum of all values in the visual.
The logic behind the metric -
The business records a "cutoff" dataset on the 9th of every month. The cutoff dataset has a record of files opened in the past month (i.e cutoff recorded on 9 May will contain data for files opened in April).
I want to design the measure such that:
Cutoff Files =
IF(
DAY(TODAY) < 9,
RETURN CUTOFF (till 2 months ago) + live data from files opened in last month
)
This will ensure that all data till the previous month gets populated, regardless of whetehr the cutoff point has been reached or not.
Solved! Go to Solution.
Hi @13havya ,
Based on my testing, please try the following methods again:
1.Create the simple tables.
2.Create the new measure to calculate.
Cutoff files =
var last_month = CALCULATE(SUM('Table'[Files]), FILTER('Table', MONTH('Table'[Date]) = MONTH(TODAY()) - 1))
VAR two_months = CALCULATE(SUM('Table'[Files]), FILTER('Table', MONTH('Table'[Date]) < MONTH(TODAY()) - 2))
RETURN
IF(DAY(TODAY()) < 9, last_month + two_months)
3.Drag the measure into the card visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @13havya ,
Based on my testing, please try the following methods again:
1.Create the simple tables.
2.Create the new measure to calculate.
Cutoff files =
var last_month = CALCULATE(SUM('Table'[Files]), FILTER('Table', MONTH('Table'[Date]) = MONTH(TODAY()) - 1))
VAR two_months = CALCULATE(SUM('Table'[Files]), FILTER('Table', MONTH('Table'[Date]) < MONTH(TODAY()) - 2))
RETURN
IF(DAY(TODAY()) < 9, last_month + two_months)
3.Drag the measure into the card visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
15 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |