Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I
I am building a Flow in Power Automate which seeks to query a table visualization published in Power BI Premium and generate a csv from that data. However, I keep receiving an error message which reads "Enter a valid JSON." My method is below.
First, I've obtained the proper visual JSON query by
1. Opening report in Desktop
2. Selecting Visual
3. Selecting Performance Analyzer
4. Selecting Record
5. Selecting Refresh Visuals
6. Hitting Stop
7. Copying the DAX from the visual I want to copy (a basic table)
When I paste the DAX code into Power Automate, I receive an error which reads "Enter a Valid JSON."
The resulting DAX code is pasted at the bottom of this post.
Here is the top of my flow:
And the bottom:
Here is the query I am entering which results from my Desktop file:
Most likely your query text is too long. You can do some severe pruning on it. Try this version:
DEFINE
VAR __DS0FilterTable = FILTER( KEEPFILTERS( VALUES( 'P15 Guest'[Booking] ) ), NOT ( SEARCH( "DO NOT USE", 'P15 Guest'[Booking], 1, 0 ) >= 1 ) )
VAR __DS0FilterTable2 = FILTER( KEEPFILTERS( VALUES( 'P15 Guest'[Depart Age] ) ), 'P15 Guest'[Depart Age] >= 18 )
VAR __DS0FilterTable3 = FILTER( KEEPFILTERS( VALUES( 'P15 Guest'[Start Date (Departure) (Departure)] ) ), 'P15 Guest'[Start Date (Departure) (Departure)] >= DATE( 2023, 6, 9 ) && 'P15 Guest'[Start Date (Departure) (Departure)] < DATE( 2026, 3, 5 ) )
VAR __DS0FilterTable4 = TREATAS( { "Booked" }, 'P15 Guest'[Status Reason] )
VAR __DS0FilterTable5 = FILTER( KEEPFILTERS( VALUES( 'P15 Guest'[LookupHouseholdID] ) ), NOT ( 'P15 Guest'[LookupHouseholdID] IN { BLANK() } ) )
EVALUATE FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'P15 Guest'[Booking],
'P15 Guest'[Status Reason],
'P15 Guest'[First Payment Date (Booking) (Booking)],
'P15 Guest'[Owner (Booking) (Booking)],
'P15 Guest'[Booking #],
'P15 Guest'[Departure Code (Departure) (Departure)],
'P15 Guest'[Parent Booking (Booking) (Booking)],
'P15 Guest'[Travel Agency (Booking) (Booking)],
'P15 Guest'[Travel Agency Network (Booking) (Booking)],
'P15 Guest'[Travel Agent (Booking) (Booking)],
'P15 Guest'[Primary Email (Owning User) (User)],
'P15 Contact List'[Salutation (Household) (Household)],
'P15 Guest'[LookupHouseholdID],
'P15 Guest'[LookupTripType],
'Trips'[Trip Name],
'P15 Guest'[Client (Booking) (Booking)],
'P15 Guest'[Address 2: City (Contact) (Contact)],
'P15 Guest'[Address 2: Country/Region (Contact) (Contact)],
'P15 Guest'[Address 2: State/Province (Contact) (Contact)],
'P15 Guest'[Address 2: Street 1 (Contact) (Contact)],
'P15 Guest'[Address 2: Street 2 (Contact) (Contact)],
'P15 Guest'[Start Date (Departure) (Departure)],
'P15 Guest'[Address 2: ZIP/Postal Code (Contact) (Contact)],
'P15 Guest'[Departure ID (Departure) (Departure)],
'P15 Guest'[Email (Contact) (Contact)],
'P15 Guest'[Household (Contact) (Contact)],
'P15 Contact List'[Address 2],
'P15 Contact List'[Address for PreTour],
'HouseholdTable Ref of Contact'[ Name (Household) (Household)],
'P15 Guest'[Departure],
__DS0FilterTable,
__DS0FilterTable2,
__DS0FilterTable3,
__DS0FilterTable4,
__DS0FilterTable5,
"CountRowsP15_Guest", CALCULATE( COUNTROWS( 'P15 Guest' ) )
)
),
NOT ISBLANK( 'P15 Guest'[Booking] ) || NOT ISBLANK( 'P15 Guest'[Status Reason] ) || NOT ISBLANK( 'P15 Guest'[First Payment Date (Booking) (Booking)] )
|| NOT ISBLANK( 'P15 Guest'[Owner (Booking) (Booking)] ) || NOT ISBLANK( 'P15 Guest'[Booking #] ) || NOT ISBLANK( 'P15 Guest'[Departure Code (Departure) (Departure)] )
|| NOT ISBLANK( 'P15 Guest'[Parent Booking (Booking) (Booking)] ) || NOT ISBLANK( 'P15 Guest'[Travel Agency (Booking) (Booking)] ) || NOT ISBLANK( 'P15 Guest'[Travel Agency Network (Booking) (Booking)] )
|| NOT ISBLANK( 'P15 Guest'[Travel Agent (Booking) (Booking)] ) || NOT ISBLANK( 'P15 Guest'[Primary Email (Owning User) (User)] ) || NOT ISBLANK( 'P15 Contact List'[Salutation (Household) (Household)] )
|| NOT ISBLANK( 'P15 Guest'[LookupHouseholdID] ) || NOT ISBLANK( 'P15 Guest'[LookupTripType] ) || NOT ISBLANK( 'Trips'[Trip Name] ) || NOT ISBLANK( 'P15 Guest'[Client (Booking) (Booking)] )
|| NOT ISBLANK( 'P15 Guest'[Address 2: City (Contact) (Contact)] ) || NOT ISBLANK( 'P15 Guest'[Address 2: Country/Region (Contact) (Contact)] ) || NOT ISBLANK( 'P15 Guest'[Address 2: State/Province (Contact) (Contact)] )
|| NOT ISBLANK( 'P15 Guest'[Address 2: Street 1 (Contact) (Contact)] ) || NOT ISBLANK( 'P15 Guest'[Address 2: Street 2 (Contact) (Contact)] ) ||NOT ISBLANK( 'P15 Guest'[Start Date (Departure) (Departure)] )
|| NOT ISBLANK( 'P15 Guest'[Address 2: ZIP/Postal Code (Contact) (Contact)] ) || NOT ISBLANK( 'P15 Guest'[Departure ID (Departure) (Departure)] ) || NOT ISBLANK( 'P15 Guest'[Email (Contact) (Contact)] )
|| NOT ISBLANK( 'P15 Guest'[Household (Contact) (Contact)] ) || NOT ISBLANK( 'P15 Contact List'[Address 2] ) || NOT ISBLANK( 'P15 Contact List'[Address for PreTour] )
|| NOT ISBLANK( 'HouseholdTable Ref of Contact'[ Name (Household) (Household)] ) || NOT ISBLANK( 'P15 Guest'[Departure] )
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
28 | |
26 | |
23 | |
22 | |
18 |
User | Count |
---|---|
52 | |
34 | |
28 | |
24 | |
21 |