cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Rolling 12 months total multiple columns with blanks - Resolved

EDIT: I realize I wasn't explaining the problem well enough, and that is my own inexperience with data modeling. But I managed to accomplish what I intended using a measure funtion to calculate the number of yards that had certain comments,

``Yardage w/ no comment = CALCULATE(SUM('Shade Data'[Passed Yardage]),'Shade Data'[Pass w/o comment]="x")``

then a rolling 12 months measure based off of that.

I'm trying to get a rolling 12 month total yardage for each of the below columns. For example, how many yards passed w/o comment, which with just the data below should show 16,687.3 yds. I can get the rolling 12 months to work to calculate pass/failed yardage, but I can't seem to get a measure to work to only count the yardage with an X in that particular column.  Or do I need to format my data differently to make this measure work?

 Date Pass w/o comment Pass with comment Pass with limit Pass with extreme limit Fail Pass Total Yardage Failed Yardage Passed Yardage 9/10/2020 X X 7744.2 0 7744.2 9/10/2020 X X 8943.1 0 8943.1 9/17/2020 X X X X 19385.2 0 19385.2 9/24/2020 X X X X 8960.7 0 8960.7 9/24/2020 X X X X 2051.2 0 2051.2 9/24/2020 X X X X 37545.1 0 37545.1 10/8/2020 X X X X 9197.1 0 9197.1 10/8/2020 X X X X 16973.1 0 16973.1 10/8/2020 X 7387.9 7387.9 0 10/29/2020 X X X 26821.3 0 26821.3 11/5/2020 X X X X 14484.7 0 14484.7 1/5/2021 X 13789.3 13789.3 0

10 REPLIES 10
Super User

Hi,

Regards,
Ashish Mathur
http://www.ashishmathur.com
Frequent Visitor

Yes, it should. 😅 Thanks for pointing that out, I've edited my post.

Super User

Hi,

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User
``I'm trying to get a rolling 12 month total yardage``

Please show the expected outcome based on the sample data you provided.

Frequent Visitor

The below visualizations are a sample of the year to date based off this data. The part I'm having trouble with is getting the rolling 12 month totals of the comment percentages as well as the yardage of each of the comments.

Super User

where do you want to take it from here?

Note there are some small data issues in your sample data.

Frequent Visitor

I was also hoping to get the yardage total for each one, so how many yards in the rolling 12 months were Pass with limit etc. And is there a way to do it with a measure? Or is a slicer the only way?

Super User

That data looks a bit weird.

Frequent Visitor

The way you formatted the data there shouldn't be any total for Passed Yardage if the result was Fail. Similarly there shouldn't be any result in Sum of Failed Yardage if the result is a Pass of any kind. But the reason it is formatted the way I posted it is because there isn't just one result. On some dates, we get total yardage that has some that passes and some that fails. And that pass can be with limit comments, and extreme limit comments in the same amount of yardage.

Super User

`` On some dates, we get total yardage that has some that passes and some that fails. And that pass can be with limit comments, and extreme limit comments in the same amount of yardage.  ``

you will need to provide the rules of precedence. or alternative guidance on what should happen.  Ideally you would show the expected result based on your sample data.

``there shouldn't be any total for Passed Yardage if the result was Fail.``

That statement is not supported by your sample data.