Siebel - Issue of a missing account - siebel

An account seems to be missing in accounts screen. On querying the DB i found that all the previous year records that were associated are being displayed instead of the current years records.
On analysing,I found this RUle Set in the Personalization Screen. The below mentioned expression was provided in the "Included Expression" field of the Rule Set.
[LN Position Year] = [LN Calc Current Year] OR [LN Position Year] IS NULL OR [LN Position Year] = ""
This should have filtered and displayed the current year accounts. But this expression seems to be overridden.
I tried using that expression in that expression in the Applet Search Spec of the SIS Account Entry Applet.It didnt seem to have any effect.
How do i proceed with this issue?

Related

Build a chart a field parameter chart with full display / topn

I have a field parameter containing 5 fields. I would like to build a chart where user can have full display (all values from field) or top10 if he wants to, ordered by CountOfItems
I try to build measure like
TOPN(10, SUMMARIZE(CategoryTable, CategoryTable[CategoryDescription], "#Count", [CountOfItems]), [#Count], DESC)
However I am getting an error that "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value." - how to overcome that? The second question is: will it apply also filters in a report to the top10 or just calculate solely top10 regardless of filters and put it into table/chart?
How to even approach such chart?
Thank you in advance
Your expression looks clean. The problem could be with your measure. Can you check/add code for [CountOfItems]? I'd try to use ADDCOLUMN + SUMMATIZE.
TOPN(
10
,ADDCOLUMNS(
SUMMARIZE(CategoryTable, CategoryTable[CategoryDescription])
,"#Count", [CountOfItems]
)
,[#Count]
,DESC
)
For the second question the answer - Yes, all filters will be applied.

New Column is Doubling Value Based on Nested If Formula

I have a table that looks like this. Table Screenshot
"FY 20-21 (Budgeted)", "FY21 Approved Budget" and "Revised Budget" are columns coming from three different data sources that I appended into one table. There isn't always data in all three of these columns, so I created a new column to consolidate the data with the following formula:
FY 20-21 Budget =
if(
and(
isblank('Comprehensive Budget'[FY 20-21 (Budgeted)]),
isblank('Comprehensive Budget'[FY21 Approved Budget])
),
'Comprehensive Budget'[Revised Budget],
if(
and(
isblank('Comprehensive Budget'[FY21 Approved Budget]),
isblank('Comprehensive Budget'[Revised Budget])
),
'Comprehensive Budget'[FY 20-21 (Budgeted)],
'Comprehensive Budget'[Revised Budget]
)
)
If both Budgeted and Approved are blank, use Revised.
If not, if both Revised and Approved are blank, use Budgeted.
If not, use Revised.
But if you look on the screenshot, if NONE of the columns are blank, it gives me Revised plus Budgeted. Where is the problem in my formula?
I have added your data here and found your Measure is perfectly returning your expected data as shown in the below image-
I Guess, there are some Aggregation issue in your case. You can right click on all column in the table visual properties and select Don't Summarize from the options. This should solve your issue I hope.

PowerBI DAX - Identifying first instance based on multiple criteria

Using DAX to identify first instance of a record
I'm faced with trying to identify the first instance in a database where someone (identified by the ID column) has purchased a product for the first time. It's possible for said person to purchase the product multiple times on different days, or purchase different products on the same day. I drummed up an excel formula that gets me there, but am having trouble translating into DAX.
=COUNTIFS(ID,ID,PurchaseDate,"<="&PurchaseDate,Product,Product)
Which results in the correct values in the "First Instance?" Column.
Ideally I won't have to hardcode values, as I would like to use the "Product" column as a parameter in the future. If there are other suggests aside from translating this in DAX, that would also be appreciated! (IE using filters, or other tools in PowerBI)
Thanks in advance!
This is very similar to an answer I gave to another question (which you can find here).
In that question, the request was to see a running count of rows for the given row's criteria (product, year, etc.). We can modify that slightly to get it to work in your problem.
This is the formula I provided in the answer I linked above. The basic concept is to use the EARLIER functions to get the value from the row and pass it into the filter statement.
Running Count =
COUNTROWS(
FILTER(
'Data',
[ProductName] = EARLIER([ProductName]) &&
[Customer] = EARLIER([Customer]) &&
[Seller] = EARLIER([Seller]) &&
[Year] <= EARLIER([Year])
)
)
What I would suggest for your problem is to create this as a TRUE/FALSE flag by simply checking if the running count is 1. This formula will evaluate to a Boolean flag.
First Instance =
COUNTROWS(
FILTER(
'Data',
[ID] = EARLIER([ID]) &&
[Product] = EARLIER([Product]) &&
[Purchase Date] <= EARLIER([Purchase Date])
)
) = 1

Remove duplicates values based on multiple column with a condition in query editor Power BI

I am new to power bi and would require your help to sort out below issue which I am facing.
Basically I am taking three columns into consideration as below:
Question: I would like to remove duplicate values from above table based on conditon "
Equal value for "Time" ,"ID" and Absolute difference in "Time spent" is lower or equal than 1"
as you can see in the image Rows highlighted falls in this category.
I would like to get these below rows removed based upon condition.
Question: I would like to remove duplicate values from above table based on conditon "
Equal value for "Time" ,"ID" and Absolute difference in "Time spent" is lower or equal than 1"
as you can see in the image Rows highlighted falls in this category.
I would like to get these below rows removed based upon condition.
I am able to perform this in excel by making us of a fourth column with formulae =IF(AND(A3=A2,B3=B2,ABS(F3-F2)<1),"problem",0) and then filtering out the rows marked as probelm. Please help!!
Regards
Mahi
I bet the suggestion from #Alexis Olson works just fine, but since you specifically mentioned the Query Editor, here's how I would do it there:
Have your data loaded like below, and just accept the changes made under Changed Type:
Don't worry about the other steps under the Query Settings. We'll get to that eventually.
Select Add Column and click Index Column, so that you get this:
Select Add Column, click Custom Column and insert this little formula in the appearing dialog box Table.AddColumn(#"Added Index", "Custom", each #"Added Index"[Time Spent]{[Index]}-#"Added Index"[Time Spent]{[Index]-1}):
Click OK, and make sure that you're getting this:
I think this step is a little weird, but you'll have to click 'Table' there in the column:
You will get an Error message in the first row, but you can remove that by right-clicking that column, and clicking Remove Errors:
Now you can click the drop-down menu in the Custom Column, select Number Filter and Does Not Equal
And insert 0, or select 0 from the drop-down menu in the dialog box:
This is it, your required numbers should now be filtered away:
Note, however, that this procedure comes at a cost since you're losing the first value due to the first step in the indexing. If the rest of this is something you can use, I can see if we can fix that last little part as well.
You can pick a representative [Time Spent] value from each unique set of rows by taking a max or min over the list of "duplicate" values. Here's the formula for such a custom column, which I'll call [Min Time]:
= List.Min(
Table.SelectRows(#"Previous Step",
(C) => (C[Time] = [Time] and
C[ID] = [ID] and
Number.Abs(C[Time Spent] - [Time Spent]) < 1)
)[Time Spent])
Once you have this custom column, you can group by [Time], [ID], and [Min Time] to roll up the duplicates and then rename the [Min Time] column to [Time Spent].

Blank() causes an error in an if() - PowerApps

I am trying to filter a table from Dynamics 365 by selecting a radio button which will update the table on the screen.
The user has three options to choose from: "School", "Business", "All".
When the user selects "All" then it should look in the "Accounts" table and search the "industrycode" column for blank values.
Below is a working Filter(), which returns the result I want
Filter(Accounts,industrycode = Blank())
However if I add an If() statement to it determine which value the user selected from the radio, I get an error that says the '=' symbol is an invalid argument type.
Filter(Accounts,industrycode = If("All" in radio_cust_type.Selected.Value,Blank()))
EDIT: When I want to check for a "School", I use a filter like:
Filter(Accounts,industrycode=If("School" in radio_cust_type.Selected.Value,34))
I intend to combine the two filters later but right now I want to check for blanks
This should work:
If(
radio_cust_type.Selected.Value="All", Filter(Accounts, industrycode = Blank()),
radio_cust_type.Selected.Value="School", Filter(Accounts, industrycode = 34),
radio_cust_type.Selected.Value="Business", Filter(Accounts, industrycode = XX)
)
Where XX is the industry code for "Business"