I create new column call "Normalization". It's Calculated filed(calculation based on other columns)
I try this formula:
=IF([Probability]="High",[Expected annual savings]*1,IF[Probability]="Low",[Expected annual savings]*0.25)
but it only shows "NO" in the field
any ideas?
Try this.
=IF([Probability]="High",[Expected annual savings]*1,IF([Probability]="Low",[Expected annual savings]*0.25,""))
Related
I have a table and a What if Parameter Slicer as shown in the image below,
What I want to do is make the Slicer interact with the Table, that is, if the Slicer value is greater than any of the Total Sales value of any customer, then that customer should be filtered out from the table.
How do I make sure of this?
I tried to add a Visual Filter on the Total Sales Column and tried to do this, Filter out all the values where Total Sales < Slicer Value, but it also didn't work for me. As it doesn't allow me to add "Slicer Value" attribute in the Visual Filter.
You can download the related Workbook from here: https://drive.google.com/file/d/15x7m3nXdlRgHdPBxOGqrJRVYYX8hEgLp/view?usp=sharing
Why I am doing this using a What-If Parameter and not by simply adding Sales Column as Slicer, is because I want to use the value of this slicer to create additional measures. That is something I can't do with Sales Column
I have a solution for you! Instead of using column , You need to create a measure first using this DAX Code:
Total Sales = CALCULATE(
SUM(transactions[sales_amount]),
transactions[sales_amount] >= SELECTEDVALUE('Sales Amount Filter'[Sales Amount Filter]))
Then If we test it on the same visual:
I hope This is what you want to have in the end!
I have a requirement where i have to summarise the sales data by department and then create a calculated column to show the percentage of how much each department had contributed towards total sales.
Here % should be the calculated column in Direct Query Mode
Since you did not provide much information or what you have already tried, I can't really guess your model, but I hope this gives you a starting point.
Create a new measure:
(replace the table name where needed)
% Sales Sub Category = DIVIDE(
SUM('Sales'[Sales]),
CALCULATE(SUM('Sales'[Sales]), ALL('Sales'[Sub Category])
)
I Would like to to calculate this week sales using DAX(Current week sales) (Latest week) Starting from Monday to the latest day of the current week/latest week.
I have attached pbix file
https://app.box.com/s/ah11tcvbq45rlc5pujunxkfloyd4x7cu
Total Sales $392
A simple WTD measure would look something like this:
Sales WTD =
calculate(sum(CountrySales[Sale]),
filter(all('Date'), 'Date'[Date] <= max('Date'[Date])
&& 'Date'[WeekNum] = max('Date'[WeekNum])))
You can read all about the calculate function online, watch videos, and there's a whole chapter devoted to it in The Definitive Guide to Dax.
Create a new visual table, drag your WeekNum and Sale in the table. Select the combobox of the Weeknum and select: Don't summarize. End result as below:
I am using Power BI Pro to generate a matrix table using month along the top, department name down the left and then a count of sales as the values.
In June we have a department that had no sales records for January so there is nothing to count.
How can I default it to show zero instead of blank? I have used IF(ISBLANK()) on the sales id which has defaulted the sales values to 0 or 1 but because there is no record for june for that department it looks like IF(ISBLANK()) makes no difference.
Screenshot
Thanks for any help.
I am trying to create a measure to calculate the sum of sales for the previous quarter with a filter.
This is what I tried:
PQ Retail Sales = CALCULATE(SUM(MASTER_SALES_REPORTING_COMPETITION[Retail Sales $]),
FILTER(MASTER_SALES_REPORTING_COMPETITION,
MASTER_SALES_REPORTING_COMPETITION[Vendor Grouped] = "Company A"),
PREVIOUSQUARTER(DateDim[Date]))
Is there a logical error with the dax? PowerBI doesn't pick up any errors however I get a blank result.
Thank you.