@needhelp
71 TopicsCurrent day Ending balance should show up as Starting balance for next day
Hello Folks, Need your help to figure out this interesting qusetion. How to write a DAX expression/measure to show currrent day ending balance as a Starting balance for next day and continue addin up as shown in the example below: Any ideas? Thanks in advance.Solved819Views0likes4CommentsPrevious QTD as of today for each quarter
Help me to create a Dax measure to show the Previous QTD actuals as of day(today) for each quarter. I have date , amount columns for example today is 6/19/2024 so we would like to see 2024-Q1 data from start of quarter to till 3/19/2024 2023-Q4 data from start of quarter to till 12/19/2023 2023-Q3 data from start of quarter to till 9/19/2023 2023-Q2 data from start of quarter to till till 6/19/2023 Currently, I am using this measure. But this is giving Total QTD.Previous Quarter QTD Actuals should be less than QTD Rev Previous Quarter QTD Actuals = calculate(SUM(Amount]),DATEADD(filter(DATESQTD('Calendar'[DateVal]),Calendar'[DateVal]<TODAY()),-1,QUARTER))1.3KViews0likes5CommentsConcatenate 3 column values as icons
I am tracking Sales to Pace (target) and need to display a matrix column with past 3 month's results as 3 concatenated icons. Example with : Here's my base DAX I've trying different methods with: $ to Pace Cumulative = 'DAX Measures'[Created] - 'DAX Measures'[Combined Pace Cumulative Table] $ to Pace LCM = CALCULATE([$ to Pace Cumulative], 'Date Table'[CurrMonthOffset] = -1) $ to Pace LCM-2 = CALCULATE([$ to Pace Cumulative], 'Date Table'[CurrMonthOffset] = -2) $ to Pace LCM-3 = CALCULATE([$ to Pace Cumulative], 'Date Table'[CurrMonthOffset] = -3) $ to Pace LCM Icon = SWITCH(TRUE(), 'DAX Measures'[$ to Pace LCM] > 0, UNICHAR(9650), 'DAX Measures'[$ to Pace LCM] < 0, UNICHAR(9660), BLANK()) $ to Pace LCM-2 Icon = IF('DAX Measures'[$ to Pace LCM-2] > 0, "✅", "❌") $ to Pace LCM-3 Icon = IF('DAX Measures'[$ to Pace LCM-3] > 0, "🟢", "⭕") Combined Icons = [$ to Pace LCM-3 Icon] & " " & [$ to Pace LCM-2 Icon] & " " & [$ to Pace LCM Icon] The [Combined Icons] column is [Last 3 Months] in example matrix. Since I'm trying to represent the value of [$ to Pace Cumulative] as an icon only, I haven't been able to come up with a measure for conditional formatting that correctly designates a color for the unicode triangles or an icon for the values of concatenated measures. Ideally, I want to display these native PBI icons for above 0 and below 0: However, the following DAX doesn't work: $ to Pace LCM-2 Icon = IF('DAX Measures'[$ to Pace LCM-2] > 0, "TriangleHigh", "TriangleLow") I also couldn't get image URLs to work in this measure. Any idea how I can display the [Last 3 Months] column using the above native Power BI green and red triangles?1.4KViews0likes6CommentsMeasure Monthly to diary.
Hi, I have a measure [A] where it gives total monthly value. Additionally, I have a measure [B] that calculates the daily value by dividing [A] by the total number of days in the month. However, regardless of the month selected, [B] always returns the value for the last month. What I want is a new measure that provides the sum of [B] for the selected date range. Here are the different measures. A =IF ( [IsValid], CALCULATE ( SUM ( 'table'[valueA] ), table[valueB] = "C" ), BLANK () ) ) B = VAR MonthlyValue = [A] VAR SelectedMonth = SELECTEDVALUE('Calendar'[Month]) VAR SelectedYear = SELECTEDVALUE('Calendar'[Year]) VAR DaysInMonth = DAY(EOMONTH(DATE(SelectedYear, SelectedMonth, 1), 0)) RETURN IF( [IsValid], MonthlyValue / DaysInMonth, BLANK() ) Example with data. For example, if I select the date range from February 1, 2024, to April 5, 2024, I expect the result to be: If the daily value of feb is 5, march is 6 and apr is 7, the result would be 5*days in February(29)+6*days in March(31)+7*days in April(5 in that case). The result is 145+186+35=366 Any assistance would be greatly appreciated. Thank you! Any help would be good, thanks!Solved2.2KViews0likes7CommentsPrevious 2 year values for current top 7 countries and others
I want to show the sales of TOP 7 countries for the selected year and the remaining sales I need to add up the country and show it as "Other" in Country Name column. After that, Based on current top 7 countries names i need to compare with previous last two years same country sales amount. Calendar Country Name Total 2024 Qatar 18.98 2024 Australia 15.28 2024 Malaysia 12.2 2024 UK 9.64 2024 United States 4.56 2024 Netherlands 3.32 2024 Canada 1.28 2024 Others 17.4 Expected Ouput: Comparing current top 7 countries with previous year Calendar Country Name Total 2024 Qatar 18.98 2024 Australia 15.28 2024 Malaysia 12.2 2024 UK 9.64 2024 United States 4.56 2024 Netherlands 3.32 2024 Canada 1.28 2024 Others 17.4 2023 Qatar 20.98 2023 Australia 17.28 2023 Malaysia 16.2 2023 UK 10.64 2023 United States 9.56 2023 Netherlands 8.32 2023 Canada 6.28 2023 Others 19.4 2022 Qatar 22.98 2022 Australia 17.98 2022 Malaysia 13.2 2022 UK 11.64 2022 United States 10.56 2022 Netherlands 9.32 2022 Canada 7.28 2022 Others 19.76 Measure used: Total Sales = VAR _start= Year(MAX ( 'Calendar'[Date] )) VAR _end = _start - 2 CALCULATE ( ROUND( CALCULATE(Sales amount),2), ALL ( 'Calendar' ), FILTER ( 'DATE', year('DATE'[DATE_TIMESTAMP_DTM]) <= _start && year('DATE'[DATE_TIMESTAMP_DTM]) >= _end ) ) This measure i used to calculate top 7 and others, and also to display last 2 year sales value comparsion with current year sales values of the top 7 countries Top7= VAR Top_N = 7 VAR TOPNCOUNTRY = TOPN(Top_N, ALL('COUNTRY'), [Total Sales] ) VAR ALLCOUNTRY = CALCULATE( [Total Sales],ALLSELECTED('COUNTRY')) VAR OTHERCOUNTRY = ALLCOUNTRY - CALCULATE( [Total Sales,TOPNCOUNTRY) VAR TOPNCOUNTRYDIS = CALCULATE( [Total Sales],KEEPFILTERS(TOPNCOUNTRY)) VAR CURRENTPCOUNTRY = SELECTEDVALUE('INTENSITY COUNTRY'[COUNTRY]) RETURN IF( CURRENTPCOUNTRY = "Others", OTHERCOUNTRY, TOPNCOUNTRYDIS ) Problem: Previous year values for current top 7 countries name is not happening instead each year it displays top 7 and others544Views0likes1CommentConverting Tableau Calculation into Power BI
Hi, I am in the process of converting a load of Tableau dashboards into Power BI but cannot figure out how to translate this particular measure and was hoping someone could point me in the right direction: Measure from Tableau: COUNTD([SNO]) / TOTAL(COUNTD([SNO])) I know COUNTD( ) in tableau is DISTINCTCOUNT( ) in Power BI. But not able to figure out the total part and also used this calculation SUMX( ALL(Query1), DISTINCTCOUNT([SNO]) ) by taking reference from the forum. But, it's not working as expected. Any help would be appreciated Many Thanks in advance1.2KViews0likes2CommentsFilters based on IDs
I have a table called 'TableBI' which stores the answers of multiple companies to multiple questions. It looks like this: Company ID Question Answer 1 Current Demand 0.3 1 Future Demand 0.2 1 Current Labor 0.4 1 Future Labor 0.5 2 Current Demand 0.5 2 Future Demand 0.4 2 Current Labor 0.3 2 Future Labor 0.2 3 Current Demand 0.3 3 Future Demand 0.3 3 Current Labor 0.6 3 Future Labor 0.7 I need to perform some calculations with the answers based on specific criteria. One of these criteria is that the Future Demand of the companies needs to be > 0.2. Therefore, I would like to create either a new filtered table or a new column that will include ALL the Answers of ONLY the companies for which when [Question] = Future Demand, [Answer] > 0.2. It should look like this: Company ID Question Answer Filtered Answer 1 Current Demand 0.3 1 Future Demand 0.2 1 Current Labor 0.4 1 Future Labor 0.5 2 Current Demand 0.5 0.5 2 Future Demand 0.4 0.4 2 Current Labor 0.3 0.3 2 Future Labor 0.2 0.2 3 Current Demand 0.3 0.3 3 Future Demand 0.3 0.3 3 Current Labor 0.6 0.6 3 Future Labor 0.7 0.7 This is very important, so thank you very much in advance!Solved1.2KViews0likes5CommentsInitial dax query run against a Fabric semantic model is taking time
Hi, Initial dax query run against a Fabric semantic model is taking time. what could be the reason for it and any optimization that can be done while retrieving data from Fabric to avoid taking more time in the intial run.Solved1.5KViews0likes4CommentsMeasure to display query string parameter from report url
Hi all - We have created report based on dynamic m paramters using direct query. We want to pass query string paramter from report url and assign the value to dynamic m parameter. Currenlty, the functionality Works fine but only issue is we want to know what's parameter value being passed in the url . I created measure but it's not working fine. Can you please help. Example: Model: Result by passing below parameter to report (filter=ProductSearch/ProductIdFilter eq 'Job6789_8d02ac83dfd6') functionality works fine but Selected Value is displaying Blank SelectedValue = SELECTEDVALUE('ProductSearch'[ProductIdFilter]) Thanks, AbhiramSolved624Views0likes2CommentsUse Parameter Values and Group by
Hi Guys, I want to develop a report with setting parameters on filter, and will directly effect on report result But now is fail when I want to group 【CalculateTransactionRange】this columns I only want to show every shop's 【CalculateTransactionRange】and AMT I try to use Summarize but seems can't get parameters in table... and last I hope TransactionRange can rank by normal not by number($1001-->$2001 not $1001-->$10001) Sample DataSolved486Views0likes1Comment