help in dax function
14 Topicsissue with weekly previous year sales
i haves sales table and calender table , both tables have dates upto yesterday only ( sales also upto yesterday only) when i selected year in filter pane(make sure not in slicer) i need to have current year weekly sales of selected year in one measure(current selected year sales) and previous year sales (not for the same period, but for all the dates, for current year weakly sales upto yesterday but for previous year i need weekly sales upto year end , make sure i need weekly sales)in other measure. please help me its urgent thenk you so much in advance507Views0likes2Commentsdatediff in HH:MM format
Hi, I have two columns: 1. Start time 2. End time. I want to know the duration of time between the two columns in hour and minute format (HH:MM) Then I want to display their summary on the "CARD" in the same format. Attached is a sample example. Thank you so much for helping. BR, AlonSolved17KViews0likes14CommentsHow to calculate the difference between two rows of a single column in power BI
Hi, How to calculate the difference between buy and sell of a salesvalues coulmn based on country by converting to rows to column of buy_sell column . Input: Country category buy_sell salesvalues India A buy Null India A sell -75,500.00 USA B buy -60,095 USA B sell 70,901 AUS C buy 29,923 AUS C sell -3,260,307 AUS D buy -60,750.00 AUS D sell -1500 USA E buy 10 USA E sell 20 USA F buy -20000 USA F sell Null Expected Output: Thanks, SBCSolved1.1KViews0likes3Comments% Comparison from Pervious Year and Month Measure
Hi Experts, I need a help with regards to % Comparison from Pervious Year and Month Measure and both should come from same visual using drill down option. we can use any dummy data to achieve my graphs Year Wise Presentation When i drill down i should view Month Wise View like below Thanks, Raghu984Views0likes3CommentsDividing column by Grand Total from another column
So I have store sales numbers for this year and last which allow me to easily calculate YOY%. I am now trying to get a sales contribution column. By this I mean, in terms of bps, how much each store contributed to the region's sales growth. I've attached a basic sample table in excel where I've easily calculated this. In Power BI, I am using slicers/filters because we have numerous regions etc. I created a measure that uses the calculate function but then it doesn't adjust dynamically based on the filters. I truly appreciate any help!3.4KViews1like3CommentsSlicer mulitple value store and then use to display visuals dynamically
Hi everyone, Can someone share some thoughts if below is doable or not? I wanted to create a report with 6 visuals and a slicer with 30 measure names(only names of measures not measure itself). Task 1 On selection of one measure name from slicer first visual will show that measure. This part is done as I am able to display visual on the basis of user selection. ( in case of radio button, when only one option can be selected ) I used below measures to toggle selected choice by user This measure to find what user has selected from slicer ( only works for single selection not mulitple ) [SelectedMeasureFromList] = SWITCH( TRUE(), [MeasureSelected] = "Volume",[Volume], [MeasureSelected] = "Revenue",[TotalRevenue], [MeasureSelected] = "Cost",[TotalCost], [MeasureSelected] = "Pure Margin",[TotalPureMargin], [MeasureSelected] = "ARPU",[ARPU], [MeasureSelected] = "AMPU",[AMPU], [MeasureSelected] = "ACPU",[ACPU], BLANK() ) This measure is used to find which measure to use to display in visual [DisplayThisSelectedMeasure] = SELECTEDVALUE(SelectedMeasureFromList[Measure],[AMPU]) Task 2 Restrict users to select fixed number of choices from slicer, like 6 in this case? I am not able find that option? Task 3 Upon user selection of 6 measures, all 6 visuals display those selected measures from slicer? For this task I am not able to find a way to store names of selected choices by user as they are more than one? In programming languages we use Strings where location 0, location1 .. location 5 will be stored and then used accordingly? Does that make sense and Doable? Your input will be crucial for my application development, plesae share your thoughts. Regards Ali968Views0likes3CommentsPower Bi Fiscal week column from Week Number
I want to build a calendar with below Fiscal WeekNum. DAX QUERIES used to create calendar table dimDate = ADDCOLUMNS ( CALENDAR ("01/04/2019", "31/03/2020"), "Year", YEAR ( [Date] ), "WEEK NUMBER",WEEKNUM([Date],2), "PERIOD","Week " & WEEKNUM([Date],2), "QuarterOfYear", FORMAT ( [Date], "Q" ), "MonthNumber", SWITCH(FORMAT ( [Date], "mmm" ),"Jan",10,"Feb",11,"Mar",12,"Apr",1,"May",2,"Jun",3,"Jul",4,"Aug",5,"Sep",6,"Oct",7,"Nov",8,"Dec",9), "ISODate", FORMAT ( [Date], "DDMMYYYY" ), "MonthName", FORMAT ( [Date], "mmmm" ), "MonthInCalendar", FORMAT ( [Date], "mmm YYYY" ), "QuarterInCalendar", "Q" & FORMAT ( [Date], "Q" ) & " " & FORMAT ( [Date], "YYYY" ), "DayInWeek", WEEKDAY ( [Date] ), "DayOfWeekName", FORMAT ( [Date], "dddd" ), "DayOfWeekShort", FORMAT ( [Date], "ddd" ), "YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ), "MonthNameShort", FORMAT ( [Date], "mmm" ) ) Please Note : My Calendar should start "01/04/2019" and end to "31/03/2020".718Views0likes1CommentNeed to return RELATED value for SKUs with Alternative IDs
Folks - I have a sistuation were I need to return the total number of Orders for a particular SKU. However - If the SKU has an Alternative SKU, I would like to see the number of orders for the Alternative SKU instead. So far - I have pulled the neccessary data into Power bI, and have set up the relationships accordingly. I have a ProductTable which contains both the SKU, and the Alternative SKU. I wanted to use the RELATED DAX to return the # of Orders - Which works. However, the SKUs that have alternative SKUs return a 0 for # of orders. This is accurate, and as expected. However - because these values have an alternative SKU - Is there a way to lookup to alternative SKUs On PO# instead? Where I get stuck - QTY on PO = IF( ISBLANK ( PRODUCTTABLE[ALTERNATIVEID ), RELATED ( QTYonPO ), Im not sure now how to point it to the AlternativeID. Let me know if any ideas are out there, or if any addtional information is needed. Thanks!1.1KViews0likes5CommentsI want to apply the color based on min and max values using measure
I want to apply the color based on the column values using measure with min and max with respect to values which are in another column. How can we chiev this? Suppose we have a table as shown below and I want to create a measure like ColorKPI which calculate colors based on the value from Column3 with respect to value from Column1. Column1 Column2 Column3 ColorKPI A a2 2 Green A a2 4 Orrange A a2 4.5 Orrange A a3 6.7 Orrange A a3 11.6 Orrange A a3 23 Red A a3 2 Green A a4 3 Orrange A a4 4.5 Orrange B b2 11.6 Orrange B b2 23 Red B b3 2 Green B b3 4.5 Orrange B b4 6.7 Orrange C c2 2 Green C c2 4 Orrange C c3 4.5 Orrange C c4 6.7 Red D d2 11.6 Orrange D d2 6.7 Orrange D d3 11.6 Orrange D d4 23 Red D d4 2 Green E e2 3 Green E e2 4.5 Orrange E e3 11.6 Red E e4 4.5 OrrangeSolved3.2KViews0likes1Comment