Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors