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
lbrusselaers
New Member

Rolling average not filtering

Hi all,

 

I created a measure to calculated to conversion rate from free to paying users in our platform. That measure originally is number of paying transitions/number of free transitions. Then I created a rolling average based on a quick measure of that rate. After some adjustments because of the time intelligence issues, the measure looks like this:

Free to Paying conversion rate rolling average =
    VAR __LAST_DATE = LASTDATE('Calendar'[Date])
    RETURN
        AVERAGEX(
            DATESBETWEEN(
                'Calendar'[Date],
                DATEADD(__LAST_DATE, -30, DAY),
                __LAST_DATE
            ),
            CALCULATE([Free to Paying conversion rate])
        )

Putting it on a graph by Year and Month it looks quite correct. But since we started in September 2019 the data is somewhat flawed there and showing 100%. I wanted to filter that out with a data slicer or even filter. The problem now is that when using a date slicer or filter (based on Calendar[Date]) the graph becomes rather weird.

lbrusselaers_0-1624462816614.png

 

After filtering or slicing to the second week of September (to not have the 100% showing). The graph looks like this:

lbrusselaers_1-1624462992830.png

I'm assuming it has something to do with my Calendar table going back to 2014 and my actual data starting only in September 2019. But I have no idea how to fix it. Anyone that knows how to adjust the formula to only look at information starting from the filter?

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @lbrusselaers 

"... September 2019 the data is somewhat flawed there and showing 100%. I wanted to filter ..."

do you mean you want to filter data out when data=100%? but how to filter? by removing the date when its data=100%? could you show a sample picture (it can be hand-drawn)?

 

 

Best Regards,

Community Support Team _ Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

AlexisOlson
Super User
Super User

What is the DAX code for your [Free to Paying conversion rate] measure?

 

(Just FYI, whenever you call a measure within another measure it's implicitly wrapped with CALCULATE. So you don't need to do that manually the way you have it written.)

Thanks for your reply Alexis!

 

The dax code for that measure is: 

Free to Paying conversion rate = [Total Free To Paying Transitions]/[Total Visitor Single Table]
So it's again made up of two measures. Where:
Total Free To Paying Transitions = CALCULATE(
COUNTROWS(Fact_Account_State_Transition),
FILTER(
    Fact_Account_State_Transition,
        ((Fact_Account_State_Transition[TargetAccountStateName] = "Paying")&&(Fact_Account_State_Transition[SourceAccountStateName] = "Free"))
)
)
and
Total Visitor Single Table = COUNTROWS(Fact_Account_State_Transition_Visitor)

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.