Please help to sort this issue out.
Source: Prime table. The date column used as prime date and base date separately. So user can compare the values between base date and prime date.
Calendar table:
Inactive calendar table: For base date
In visual table we have the measures such as "difference between base date & prime date" and the conditional string iteration based on the measures.
Issue: I just want to calculate how many “Same” or "Increase" there in the visual table for bar chart visualization purpose. Any measures or visuals not helping me because the following visual created from multiple tables and measures although it looks like simply.Visual Table output from power bi
I couldn't get the count or sum of "SAME" instances.
Source enter image description here
Expected outputenter image description here
Intermediate table ( Visual table ) - need to create expected output from this tableenter image description here
Related
I have a large dataset, about 3600 rows, that contain product data. Each one is a different line item with different $ values associated with it. I am trying to consolidate this dataset into one row per unique account with all of the pricing data and products rolled up into one row.
What would be the best way using Excel or SQL or Microsoft Power BI to transform the first table into the desired table??? I can sort of do what I am thinking of by using a pivot table but it doesn't turn into a single row, though it does summarize like this.
Starting Table
Desired Table
Thanks!
You could achieve it by Power Pivot:
Where Product by Customer is a Measure created by the formula:
=CONCATENATEX(Table2,[Product],"; ")
For larger dataset this seems to work better:
=CALCULATE(CONCATENATEX(VALUES(Table2[Product]),Table2[Product],"; "))
To create the Measure:
Click on your pivot table and got to "Power Pivot", upper right corner. Then click "Measures" -> "Manage Measures..."
Click "New" and fill in with the formula.
Notice I have ";" as delimiter but you might have ",".
I realize that this question is quite basic. And I have found various answers on various other forums - all of which use SQL which for the purpose of this assignment (it is for school) I cannot use. I have to physically type the answer into the Field box.
The question reads as such: "Add a calculated field in the third column. Name the field ExtendedAmount. This field should multiply the quantity ordered (from the Order Details table) by the unit price for that item (from the Products table). This will calculate the total amount for each order. Format the calculated field as Currency and change the caption to Total Dollars. Change the Total row to Sum."
I have attached a screenshot of what I tried, in Design View, as well as the relationships of the tables required for the question and other parts of the query. When I click "Run" that is where I hit a snag - it provides and other box which says, "Enter Parameter Value" which as I understand it should be supplied by the Order Details Table.
Does anyone have any idea as to what I can do to fix this? Here is the expression I built as well --- ExtendedAmount: ([QuantityOrdered]*[UnitPrice])
Thanks,
Josh
The quantity field is called [Quantity], not [QuantityOrdered]. Adjust your expression accordingly.
I have a chart in an ASP.Net Web Form (Visual Studio) connected to a SQL server database table.
Y-values: electricity consumption
X-values: date and time
The user selects the interval he wants to see. These values are used by a stored procedure to create a temp table. This temp table is used to create the chart.
Easy example of table after user action
Corresponding chart
I just want to see the bars with table values.
In other words: I don't want to display points that don't have table values.
I tried playing around with the 'empty points' settings in chart control, no results
.
I also tried setting the x-axis datatype to a string, which didn't make any difference.
I searched high and low for a solution but couldn't find one.
If anyone ever has the same problem:
I got it to work by converting the dates to varchar in my SQL server table!
example
I'm super confused how to apply the if/else statement in an Access table field, not a query. Please help! Here is what I'm required to do based on the table I constructed:
Fill in the overall rating field, using this formula: If the is available field is false, the overall rating is “pending”, regardless of the scores. Otherwise, if each rating score is 9 or above, the rating is ''excellent"; if the interview average is 9 or above and one rating score is less than 9, the rating is ''very good"; if the interview average is less than 9 and one (or both) rating score is 8 or above, the rating is "erratic"; otherwise the rating is "reject".
click here to view the table
From Access 2010 onward you can indeed create calculated fields in a table. To do that, open the table in Design View, enter the name for the new column and choose Calculated as its data type.
Use the Expression Builder or any external text editor to build/write the expression for the calculated field. There is only a limited subset of functions available to be used in a calculated table field. So in this case the Expression Builder actually is helpful, as it shows only functions that can be used in this context.
To achieve the result as per your requirements, you will need an expression with several nested Iif-Function calls. (The Switch function is not available here.)
The actual expression will be same as you would use in a query.
This is how you can do it, if you really want to. – I agree with the commenters that in almost any case it would be better to use a query to do any calculation of this kind.
We're trying to create a template date prompt to be used across multiple universes, and also be used against multiple date fields (for instance, Transaction Date, Invoice Date, etc)
The prompt should display a list of values like the below (there's about 30 total):
Date Range START_DATE END_DATE
-------------------- ------------------------------ --------------
D: Yesterday 12/02/2015 12/03/2015
M: Month Before Last 10/01/2015 10/31/2015
M: Month to Date 12/01/2015 12/02/2015
Our initial attempt at this (creating a derived table, and then some aliases against the derived table, with one alias for each date type such as Transaction Date, Invoice Date, etc) was a failure - the sql generated is wrong, and includes the sql that's just supposed to provide the list of values. I think we need to use a different approach entirely.
Thanks for reading so far. I would greatly appreciate any ideas! Feel free to ask questions and I'll edit my notes to answer.
EDIT - we're using UNV (legacy Universe Design tool)
I'm going to assume you have an existing (dimension) table that contains a record for each date and the necessary columns to hold the different representations. You can also create a derived table for this.
Here are the steps to achieve what you described (sorry, no screenshots, this is off the top of my head):
Create the required dimension objects (based on your date table) in a separate class in the universe (you can hide this class at the end; the end user shouldn't see them).
Take one of the date dimension objects (e.g. Transaction Date, Invoice Date. …), enable the LOV option and edit it (which should bring up the query panel).
In the query panel, select all the dimension objects, created in step 1, that you want to show in your LOV. Important: the object holding the value to be returned, should be placed first in the query panel. Run the query (nothing will appear though).
Make sure that you enable the option to Export the LOV, otherwise your customisations will be lost upon exporting the universe. Optionally, enable the option to refresh the LOV each time the user calls it.
As you can't really define a single, reusable LOV in UDT that you can reference in different dimension objects, you'll have to perform this for each dimension object that you would want to have this LOV.
One way around this annoyance may to define the customised LOV once, note down the generated LOV name (about 8 alphanumeric characters long) and then replace the LOV name in the other dimensions with that LOV name. I'm can't guarantee that this will work though.
In contrast: with IDT you can define a customised LOV like this once (either in the Data Foundation Layer or the Business Layer), and then reference it as much as you want.