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
jayendra
Frequent Visitor

showing false when list does not any record

while i am excuting the Power query the  list does not contain no records in Power Bi .At that time it showing the " the table is empty "i want to show false.But i am getting error.Can you please help me how to make it as false.

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@jayendra,

Add a new blank query in Power BI Desktop, then create a function in the Advanced Editor of the query with the List.IsEmpty function to check the list, when the list is empty, return false, otherwise expand the list. Below is an example for your reference.

let
     export = (TextName as text, listname as list) =>
        let
            name = TextName,
            Table = Table.FromList(listname, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
            result= if List.IsEmpty(listname) then name else Table
in
 result
in
    export

1.PNG
2.PNG


Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@jayendra,

Add a new blank query in Power BI Desktop, then create a function in the Advanced Editor of the query with the List.IsEmpty function to check the list, when the list is empty, return false, otherwise expand the list. Below is an example for your reference.

let
     export = (TextName as text, listname as list) =>
        let
            name = TextName,
            Table = Table.FromList(listname, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
            result= if List.IsEmpty(listname) then name else Table
in
 result
in
    export

1.PNG
2.PNG


Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Salvador
Responsive Resident
Responsive Resident

Hi,

 

Could you try with Column = IF(ISBLANK(table[columntocheck]);"False";table[columntocheck])

Regards,

Salvador.

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.