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

Stripe not showing all data?

New to Power BI and very impressed so far! I have added Stripe, but it is only showing data from the last couple weeks it appears. Is there a way to change this so that it loads more data?

1 ACCEPTED SOLUTION
ankitpatira
Community Champion
Community Champion

@mastermaq I am guessing you're using Stripe Content Pack. Refer to this article which says it currently extracts data over last 30 days. I am guessing since its service content pack you don't have ability to change that. What you can do is submit it as an idea so that it gets noticed and prioritised. 

View solution in original post

4 REPLIES 4
cslau5
New Member

I have recently make this work with M query loop and hope it may help others who need to retrieve historical data with Stripe API

 

let

 iLimit      = 100,
   
    getAPIResult = (nextObj) as record =>
        let response = if nextObj <> "" then Web.Contents("https://api.stripe.com/v1/refunds",[Query=[limit="100", starting_after=nextObj]])
                                        else Web.Contents("https://api.stripe.com/v1/refunds",[Query=[limit="100"]]),
            Source = Json.Document(response),
            data = try Source[data] otherwise null,
            hasMore = try Source[has_more] otherwise null,
            recordCount = List.NonNullCount(data),
            lastPosition = recordCount - 1,
            lastObj = try Source[data]{lastPosition}[id] otherwise null,
            nextObject = lastObj,
            next = if hasMore = true then nextObject else null,
            res = [Data=data,Next=next]
        in
            res,
    fullList = List.Generate(() => [i=0, res = getAPIResult("")],
        each [i]<iLimit and [res][Data]<>null,
        each [i=[i]+1, res = getAPIResult([res][Next])],
        each [res][Data]
    )
in
fullList

Thanks so much. It was very usefull!!!

ankitpatira
Community Champion
Community Champion

@mastermaq I am guessing you're using Stripe Content Pack. Refer to this article which says it currently extracts data over last 30 days. I am guessing since its service content pack you don't have ability to change that. What you can do is submit it as an idea so that it gets noticed and prioritised. 

@ankitpatira I must have missed that, thanks for the link and clarification!

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