I have matrix in my report having column field "Layer Origin".
Layer Origin has 3 values:
New Business
Renewal - Rewritten
Renewal - Same Terms
if i run the report as is it will show Totals for each of the 3 above.
What i what is to show the Totals for:
New Business
Renewal (Renewal - Rewritten + Renewal - Same Terms)
i.e.: i want to sum the values of Renewal-Rewritten and Renewal- Same Terms
Below is a screen shot to illustrate my request.
Thanks for your reply.
ive tried the below code but it gave me error (see the below screen)
=SUM(IIF(Fields!Layer_Origin.Value="New Business",0,Fields!USD_Cedent_Premium.Value))
I appreciate your feedback.
This situation can be handle if you just use conditional SUM in Total Column
=SUM(IIF(Fields!Layer_Origin.Value="New Business",0,Fields!USD_CED.Value))
Instead of using
=SUM(Fields!USD_CED.Value)
I think it will solve your problem. Pardon me if some spell mistake or syntax error. As i dont have any VS intalled to check.
Share if you still face any issue bcz this one is definetly i can help.
After Several testing i found the problem.
the code should be as below:
=SUM(IIF(Fields!Layer_Origin.Value="New Business",CDec(0.00),Fields!USD_Cedent_Premium.Value))
Thanks for your assistance
Related
I would love to do some slicer filtering (icon based) - which I already did and it works for me well when I have the values in columns. I have the issue when I wanted to use measures instead of columns.
I am not allowed to connect measures in data model with table "Icons YTD", therefore I decided to create column (column could be connected in data model with my icon table). I tried everything but the results are every time wrong.
Picture available here:
Measure works:
Actual/Planned Hours [%] - MEASURE = DIVIDE([YTD Actual Hours],[YTD Planned Hours])
Column doesn't works: (shows everywhere 0) even the same calculation is used
Actual/Planned Hours [%] - COLUMN = DIVIDE([YTD Actual Hours],[YTD Planned Hours])
or I tried
Actual/Planned Hours [%] - COLUMN = Hours[Actual/Planned Hours [%] - MEASURE]
and I tried lot of more, but nothing helped me.
Calculated and used measures for calculations above:
YTD Actual Hours = CALCULATE(SUM(Hours[Actual Hours]), Months[YTD Months]=true,ALLEXCEPT(Hours, Hours[ID], Hours[P],Hours[D], Hours[Actual Hours]))
YTD Planned Hours = CALCULATE(SUM(Hours[Planned Hours]), Months[YTD Months]=true,ALLEXCEPT(Hours, Hours[ID], Hours[P],Hours[D], Hours[Planned Hours]))
Do you have any idea how to create it?
Thank you a lot!
The problem has nothing to do with icons and everything to do with the fact that you cannot filter by measures without jumping through some hoops. Here is a very good video on filtering with measures.
Stuck at a specific measure calculation which looks like this in tableau
1.) zn(COUNTD(if not isnull([Order_number]) then [Order_number] END)).
I tried using isblank dax function but it is not working as i expected it to be.
How will the same measure be written in Powerbi using DAX?
Problem 2
Simultaneously, not able to get the output for a particular calculated column in powerbi for which the tableau query to derive that particular column looks like this:
2.) zn(IF CONTAINS([Record Type],"High") and datename('weekday',[Activity Date]) = 'Sunday' AND [Location] = '08520' THEN 7 ELSEIF CONTAINS([Record Type],"Junior") and datename('weekday',[Activity Date]) = 'Sunday' AND [Location] = '8520' THEN 7 end
I re created the above by Creating a custom column named it as Day Name deriving day name from the date column and Wrote an equivalent query in Powerbi query editor to create a custom column, query mentioned below. Even though there is no syntax error, it is giving 0 for all the rows in that particular calculated column.
slots= if([RECORD_TYPE]="high" and [Day Name]="Sunday" and [LOCATION]=08520) then 7 else
if([RECORD_TYPE]="Outbound" and [Day Name]="Sunday" and [LOCATION]=3109) then 7 else 0
Any kind of lead or help will be much appreciated.
Thanks in advance
For 1st problem:
zn(COUNTD(if not isnull([Order_number]) then [Order_number] END))
So, If i break this query basically, zn is a function used in tableau to convert all the null values to zero and as countd implies to the entire if statement above.
I was able to write an equivalent dax query for it mentioned below, if anyone out there can tell me or verify if it is correct or not, I'll be really thankful.
IF(ISBLANK(DISTINCTCOUNT(Order_table[ORDER_NUMBER])),0,DISTINCTCOUNT(Order_table[ORDER_NUMBER]))
As far as the second problem goes, im not able to find a solution to it and the value for that column for all the rows stands at 0 as I'm writing this answer to 1st problem. Any kind of help or lead will be much appreciated.
Thanks
I have noticed with one of my reports (SSRS), when I add weekdayname, that tomorrow's value appears.
I tested this by adding a textbox with =WeekdayName(weekday(Today())) in it. I have just run this (on a Monday) and it is saying Tuesday. So clearly it's one day out.
Does anyone know how I can go about rectifying this? I can get round it in reports by adding an expression but I suspect there's some deeper problem that I would like to rectify.
Any advice would be much appreciated.
Try specifying the first day of the week in the Weekday function to be determined by the system settings.
=WeekdayName(Weekday(Today(),FirstDayOfWeek.System))
I am trying to get a column in a report, and I am having the issue where the report will show #error in the column. I think I have found the cause, but I am unsure, and I'm also unsure how to solve it.
The code I am currently using is:
=iif(SUM(Fields!ask_response.Value)>SUM(Fields!ask_totalduration.Value), "Time Met", "Time not Met")
Some of the values have 0 in the one of the 2 columns involved. Is there a way to get it to say "Time Not Met" if the value is 0?
Thanks
Joe
Nested IIf's are a true pain and I have had similar issues before. Copy this to a new location and start over, working your way from the inside out, testing at each level to make sure you do not get an error.
I am not sure you should be using sum in this instance.
I am not sure if this will work but I have...
=iif(IIf(IsNothing(Fields!ask_response.Value),0,Fields!ask_response.Value) > IIf(IsNothing(Fields!ask_totalduration.Value),0,Fields!ask_totalduration.Value),"Time Met", "Time not Met" )
My data and this SSRS chart have a ton of problems, I'll try to keep my question(s) succinct.
First, as you can see by this chart and this screenshot of my data (just showing date and April Savings), my expression/chart is not summing all of the savings within a month, which is my goal.
It appears to be picking one amount within the correct month and using it. I set up a tool tip for April so I could see what number it's pulling (since clearly the chart columns are not representing the data whatsoever - another issue).
You'll see in the SQL data screenshot that it does indeed pull $1,230 from the April 2013 Savings. How can I get this to Sum within the month AND still do a running value from the beginning of time data began to current, this often will include multiple years.
Here's my Chart Data (note that my Team Goal works perfectly, and is even charted correctly - but if anyone knows how to force that line to go from end to end on my chart, feel free to let me know.) :
To summarize, how can I sum each month's data, while still do a running value across the months AND years?
Here's my Expression for Implementable Savings:
=RunningValue(Sum(Fields!ImplementableSavings.Value), Sum, nothing)
(obviously if I can get one working, I can get both)
My Expression for ImplementedSavingsMonth:
=MonthName(Month(Fields!ImplementedSavingsDate.Value))
My Expression for ImplementedSavingsYear:
=Year(Fields!ImplementedSavingsDate.Value)
Let me know if there's anything else I can provide.
Quick sidebar question: WHY does my chart column collect one piece of data. IE: see the tool tip $1,230 for April 2013), but the chart column displays that the number is around $1.7M? And in this scenario, both of my blue and yellow columns are displaying the same number, so why does blue always appear to be a higher number? I will ask this as a 2nd question if it's inappropriate for me to ask here.
I would use this Expression for Implementable Savings:
= RunningValue ( Fields!ImplementableSavings.Value, Sum, "Chart1")
.. assuming your Chart's name is Chart1.