How to replace 0.00 values with null in OBIEE12c . my column datatype is number - obiee

How to replace 0.00 values with null in OBIEE12c . my column datatype is number
i need to apply it in RPD or as a self servicing report . it is not require for dashboard and prebuild report

You can use a CASE statement in the column formula of the report, e.g.
case "MyTable"."MyColumn" when 0 then null else "MyTable"."MyColumn" end

0 and NULL are totally different things in analytics and what you're trying to do is already conceptually wrong.
If you made 500 this month and -500 last month does NOT mean you did NULL when aggregating both months. You did 0. And that also why you can't use NULL with numerical data types because you can not aggregate NULL.
Please don't force the system to violate all rules of data processing just do pull some GUI stunts.
EDIT: "Show blank"? Well you're supposed to be doing analytics with corporate data and not MS Paint, but here goes: Set a conditional rule on the column where value = 0 and then set a custom CSS style of "display:none". Ridiculous but will do what you want.

The easiest option is to save as a system wide default for that column.
Set the formatting you want and then on column properties click the save as default and save as the system wide default for that column
Both options will work in the front end but the value will still be output if you export data
Conditional Formatting
Create an analysis with the column you want formatting in.
Add conditional formatting where this value = 0
Either set the font size to 0 or use an image and set to image only
Custom Number Format
Set the number format to be #

Related

Power query - strategy for handling repeating rows

Given a report which as a table with repeated row headings, is there a good strategy for using Power Query/M to extract the data in a clean format?
For example the report available here, has an excel file (which at time of writing is pointing to August 2021):
https://www.opec.org/opec_web/static_files_project/media/downloads/publications/MOMR%20Appendix%20Tables%20(August%202021).xlsx
In this example:
we have the World demand table portion
Non-OPEC Liquids production portion
both of these have rows: Americas/Europe/Asia Pacific:
which makes it hard to distinguish them in Power Query
What is right approach which would allow extraction of data from this type of table?
I would add a column ... custom column ... with formula
=if [2018] = null then [Column] else null
and then right click the new column and fill down
That would put World Demand and non-OPEC as a column that you could additionally filter on

Setting parameter controls and using filters

I currently have a dataset of speeding fines in NSW.
I've created a bar chart that displays the top 10 frequencies of speeding offenses. These offenses are split up between school zone offenses and normal speeding offenses.
I'm trying to set a parameter control where the end-user can toggle showing the top 10 normal speeding offenses (pink), top 10 school zone offenses (purple) or both together (pink and purple).
I've gotten the below parameter control:
However nothing happens to the bar-chart.
My Dataset looks like the following:
I have a School Zone Indicator boolean that is a Y if the speeding offense occurred during school zone time.
Can someone help me figure out in filtering this out when setting parameter controls?
The answer is based on this article showing how to add all to a parameter in Tableau.
We need to create a parameter with the same values as the field. As your field is either Y or Null let's create a new field to convert the Null to N. Call it isSchool with the formula:
IFNULL([SCHOOL_ZONE_IND],"N")
Create a parameter based on that field with the values Y, N and All. Display As whatever you want, so you can display parameter value All as Show Both if you wish.
Put [isSchool] to filters.
In the filter you want to filter Condition - by Formula. Enter this formula:
IFNULL([isSchool],"1")=IF [YourParam]!="All" THEN [YourParam] ELSE IFNULL([isSchool],"1") END
That should do it.

OBIEE - Showing the Display Value from a Double Column / Presentation Variable

I have a double column laid out as so:
Display Value Code Column
Apr-17 201704
May-17 201705
Jun-17 201706
A 'between values' prompt is setup to show the Display Value and Filter by Column Code, and it's been given a presentation value.
So say I selected Apr-17 to Jun-17, the presentation value displays Apr-17,Jun-17 in the narrative, however I'd prefer it read like Apr-17 to Jun-17
I'm unable to use the SUBSTRING function in the narrative, so I decided to add the presentation value into a column and work from there.
However, once I add the presentation value the Column Formula, it displays the Code Column values instead of the Display Values, so:
201704,201706 instead of Apr-17,Jun-17
Is there a fix for this, or an alternative way of getting the desired formatting?
First of all your filtering seems extremely standard so I question your use of presentation variables in the first place.
If you just use out-of-the-box filter functionality with columns then you can just use the filters view.

How do you show all rows with missing fields in Crystal Reports?

I'm struggling with Crystal Reports suppressing rows whenever I add a field that some rows may not have data in.
I've been able to fix some of the rows and make them show by using the formula:
if not isnull({field}) then {field} else "Arbitrary string to make row display"
This at least fills in the absent field with something and displays the row.
Do I really have to try and identify every field that may have incomplete data for some rows? Or is there some global method to make all rows show no matter what?
Something like: If isnull(ANYTHING) then " "?
you can do right click on the field, then under suppress, click the formula icon beside it and you can input there the conditions.
You can try the following in report options:
Convert Database NULL values to Default
Convert Other NULL values to Default.
This is hidden in File > Report Options. I have used Convert Database NULL Values to default to show 0's instead of blanks for null valued summaries

Formula to show specific database field Crystal

Is there any way to set up a formula to display a value depending on the value in another field?
Say if new_field = -1 then display info in new_field2 of that data row? How would a formula for that work?
I've tried it now with doing a formula that just has
if{table.order} = 3 then {table.value} ...the value is a number...but it is just showing 0.0 each time while the value is showing up normally with the other records that display above when just dragging and dropping the database value field into my group. I'm trying to put this formula in the report footer to display additional information on one of the records.
Create a formula similar to the following: #DisplayNote
Global stringvar xx;
if {db.field1.value} = 1 then xx:= "your text" else xx:= ""
Then create a running total formula: #DisplayText
Select the #DisplayNote formula as the field to summarize.
Type of summary = maximum
Then place the #DisplayText on the pagefooter.
In the footer, it is too late to display info on any single record in the report. They have all been processed and are gone by the time the footer is proocessed.
You could probably set up a global variable and set the value in a hidden formula in the detail section when the interesting record is processed. The use a formual to display the global variable value in the footer.
Try inserting the maximum of the formula value into the report footer, instead of the formula value itself.

Resources