Is there another way of forcing a Data Block in a Dataview to be always shown even if it has no value apart from checking the "Show all" in Axes?
Hi @Efraim ,
Could you share a bit more detail about your use case so I can better understand the scenario? Are you trying to display a “0” in cells that are blank? If that’s the case, you can simply toggle the “Hide zeros” option for the relevant data block.
Kind regards, Hamza
I want a specific data block (column) to be still visible in the Dataview even if it doesn't have any value. I know that you can force all data blocks (columns) to be visible if the "Show all" checkbox is checked in the Axes but I want the other data blocks to be visible if they have values while this specific data block to be always visible regardless if it has value or none.
Thanks, @Efraim, I think I understand your issue. If you don’t want to enable the "Show All" option, you can achieve that using a a simple algorithm block as a workaround.
For example, say you have a numerical cube in your dataview (say block "c") that is currently empty, but you still want it to appear as a placeholder until data is available in it. You can configure an algorithm block with logic such that if block "c" is empty (i.e. its total = 0), then display a blank placeholder, otherwise display nothing.
With this setup, while your cube in block "c" is empty the placeholder will be visible with the cube’s name. Once the cube contains data, the placeholder will automatically disappear and the actual cube values will display instead. See the following screenshots to illustrate what I described: Screenshot 1: Dataview with "Show All" option disabled
Screenshot 2: "Expense fct" cube (shown in bottom dataview) is empty —> placeholder shown
Screenshot 3: "Expenses fct" cube has data (50k) —> placeholder hidden and actual cube is displayed
Screenshot 4: Dataview configuration showing the algorithm used for this workaround (block d)
I hope this helps. Hamza
Thanks @Hamza Mesbahi ! Just a question, what is the function "dt" you used on data block d?
Hi @Efraim , the "dt" function stands for "down total" and calculates the total sum of the block being referenced. In the example I shared, the logic checks whether the overall sum of all values in block c (expenses fct cube) equals zero.
The reason for using the down total instead of checking cell by cell is to avoid the placeholder column being falsely triggered. For instance, if Services has 0 in the expense fct cube but Facilities has 50k, a cell-level check would still trigger the placeholder column, even though the cube now has data. By basing the algorithm on the sum total of block c, the placeholder only appears when the entire cube is empty. Hope that helps. Hamza