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
Rasmusrock
Helper II
Helper II

Force table to show blanks

Hi everyone,

 

I have a problem with the table visual in PowerBi Desktop.

 

Do anybody know if you can force it to show blanks?

 

My example is this:

 

If you have a general ledger with 12 accounts. Revenue, production costs, contribution margin etc. but lets say nothing has been charged on one of the accounts in a given month. Then this account will no longer be shown in the table if you slice on this particular month. Is there any way to force the table to show the account even though it is blank??

 

Best regards,

 

/Rasmus 

 

 

6 REPLIES 6
Sean
Community Champion
Community Champion

@Rasmusrock I know exactly what your talking about - and it is a source of big frustration...

 

You want to force ALL dates to show (whatever they may be in the Calendar) regardless whether there's an entry or not

 

@Greg_Deckler's solution works but it has very limited use (I use column = 0 because in a stacked column chart - it adds nothing)

 

As soon as you try to break down the data in a table or a visualization it again removes the dates where there are no entries

 

In the picture you can't place any field in the Column Series (in the Chart) and you can place another field in the table but then the dates with no entries disappear...

 

Force DATES.png

 

EDIT: Try creating a Measure that simply sums this column = 0 and then add this Measure to your table/matrix

Then drag with the mouse to hide it as in the picture...

This seems to help with the Matrix but not with the Charts Smiley Sad

 

Force DATES2.png 

 

Hi @Sean,

 

Thanks for the input, however, it does not solve my problem.. I have put a bit more work into it, and hardcoded my data into PowerPivot in Excel, to check if it works here - and it does!!

 

My output when i insert a table in PowerBi Desktop:

 

Snip PowerBI desktop.PNG

And my output in excel:

 

Snip Excel.png

 

Exactly the same tables, relations and measures are used in both scenarios.. So does anybody have a clue on why it shows data in the 'dækningsbidrag', 'driftsresultat' and 'resultat før skat' rows in Excel and not in PowerBI Desktop when i slice the data on year and month?

 

Best regards,

 

/Rasmus

What is your formula in Power BI for Realiseret?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

It is a combination of 4 formulas:

We start with, where 'transaktionstabel' is the transactions from the general ledger.

 

Corrected Amount = Calculate(SUM(Transaktionstabel[Amount])*-1;Kontoplan[Account Type]=0)

 

Then we use:

 

Running totals = IF(HASONEFILTER(Header[Header]);CALCULATE(Transaktionstabel[Corrected Amount];ALL(Header[Header]);Header[Order]<VALUES(Header[Order]));BLANK())


Over into:

 

Combined = SWITCH(Header[Header CalcType];BLANK();BLANK();1;[Corrected Amount];2;[Running totals])

and end with:

 

Realiseret = IF(AND([Header Detail]=0;[Is Filtered]);BLANK();[Combined])

------------------

 

I hope you understand it, otherwise ill gladly provide more information 🙂

 

/Rasmus

Nhallquist
Helper V
Helper V

@Greg_Deckler had a good solution on a different post.  In the Data section, create an IF statement that uses ISBLANK to find the Blank field, and puts in "$0" where it is blank, ELSE the field value.  

 

That should work as well.

 

Nate

Greg_Deckler
Super User
Super User

You could try this, create a column like:

 

Column = 1

Add that to your table visualization and then drag the column width so that it disappears. Since that column will always contain a value all of your table rows should display in the table.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.