Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Hi, Howe can i get the Json from Power BI

(0) ShareShare
ReportReport
Posted on by 20

Hi, 

How can i enter the value field with Json from the Power Bi Fields. I need to choose two fields from the query, which ae Norms and Code. Can you please help me?

When i tried to choose from the dropdown menu it gives me another loop, so How can i do it?

Ameer1_1-1667822021605.png

 

Thank you

 

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Sundeep_Malik 

     

     

    In order to generate two documents for the previous example, union gives me unique one raw, but i need few raws for one document, is there any suggestion?

    Capture1.JPGCapture2.JPG

     

    Thankyou

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    Yes, I need to generate one document for each order code. in the previous example i have two order code. so two documents.

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Ameer1 

     

    So you want 1 separate file for the both the order codes, so like 

    1st file

    All the three first items, which have ordercode same?

    2nd file

    All the next three items, with ordercode same?

     

    Then you should try using the union function for this. 

    Giving you a link for it:

     

    https://www.c-sharpcorner.com/article/usage-of-union-function-in-power-automate/#:~:text=In%20Power%20Platform%2C%20at%20times,used%20to%20explain%20this%20behaviour.

     

     

     

     

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    The first method (Variable) worked!

    For example, for two order code, I have data like this. Apply to each function before the generate document function would work? How would the apply to each function go to the next order code after generating the document?

    Thanks

    Order codeModelCodeRevDesriptionDirectiveNorms
    158SW BS LED1014567A MW 4000K4 CEI EN 605
    158SW BS LED1014567A MW 4000K2 CEI EN 605, 2009/125/C, CEI EN 605, CEI EN 605, CEI EN 605, 2009/125/C
    158SW BS LED1014567A MW 4000K36 EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU, EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU
    40160DL SanificaAria1014566A U19C90 D3K UV2 CEI EN 605, 2009/125/C, CEI EN 605, CEI EN 605, CEI EN 605, 2009/125/C
    40160DL SanificaAria1014566AU19C90 D3K UV36 EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU, EN 62471, 874/2012/C, 2014/30/EU, 2014/35/EU
    40160DL SanificaAria1014566AU19C90 DLK UV54 ISO 15714, EN 60335-2
  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Ameer1 

     

    Which method worked, variable or select one??

     

    There are two loops in power automate.

     

    Apply to each, which works like a for each loop.

     

    And 

     

    Do Until

     

    You can use apply to each for your case.

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Sundeep_Malik 

     

    It works Finally! Thank you very much.

     

    Is there any way we can make a loop in power automate. I have many order codes and i want to make a file for every order code. So i would have to assign a loop function to the order code before generating the documents. is it possible?

     

    Thanks

  • Verified answer
    Sundeep_Malik Profile Picture
    6,480 on at
    Re: Hi, Howe can i get the Json from Power BI

    Both Methods:

     

    1) Variable one:

     

    Initialize empty array variable like this:

     

    Sundeep_Malik_0-1667838927489.png

    And after this add apply to each and append to array action and make json data like below:

    Sundeep_Malik_1-1667839183992.png

     

     

    2) Select action:

     

    Do, something like below. On the right side, add item()['FieldName'] or item().FieldName or item()?FieldName.

    Whichever works for you.

    Sundeep_Malik_3-1667839444192.png

     

     

    If the above two methods dont work, I dont think I can help you any further.

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Sundeep_Malik 

    What's the other method? Didn't get that either. May be i could try the other way or the way she did.

    Thank you

     

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Ameer1 

     

    Ok. Got it what she did in the video. Actually she might have directly copied the dynamic field values. But, I won't suggest the technique that she has used in the video.

    Instead do this:

     

    Initialize an empty array variable, don't add the Power BI Data dynamic field. Keep the value empty. 

     

    Then add an apply to each action, pass the Power BI Data dynamic field in that. Then use append to each variable. And pass each column in that while creating that JSON format. 

     

    There is one more technique, if this does not work, I will tell you that. 

  • Ameer1 Profile Picture
    20 on at
    Re: Hi, Howe can i get the Json from Power BI

    @Sundeep_Malik 

     

    I wanted to take two fields from Power BI. 

    I followed the format you sent (

    {

    "Name": SelectDynamicFieldForName,

    "Id": SelectDynamicFieldForID,

    "Address": SelectDynamicFieldForAddress

    }

    But when i select the every option i click, it automatically add an other loop(apply to each).

    Ameer1_0-1667834980478.png

    I think there is some small error, which i don't get it.

     

    Thank you.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics