dax tip
6 TopicsTop rank doesn"t work when I choose a filter in segment
Hi Powerbi's world, I have created a specific formula with rank and "TOP rank" segment. I have also added a filter which is be able to exclude or not specific turn over (service fees). 1. First, I have created a rank formula : And it works ! rang N TOP CA = RANKX(ALLSELECTED('Marque annonceur'[Groupe ou Marque Annonceur]),CALCULATE(([CA N DATE (m)])),,DESC) Next, i have created a "TOP RANK" with these mesure : Mesure_flag = Var _top=SELECTEDVALUE('TOP CA'[TOP CA]) return if([rang N TOP CA]<=_top,1,0) Here is the result : It works too ! So far so good............ until this moment below : 3. And next, this is more complicated, i need to apply this filter in segment (the aim is to subtract some services fees to the turnover) so i need to choose "non" : When I have choosen "Non" (Services fees are excluded), the top rank doesn't work. Questions are : Where I need to change the formula and how i can do it please ? Thank you in advance for your help. Léna578Views1like1CommentWin Rate
Hi there! In my data query I have a table with the 'Sales Information', includes the following columns: Deal value Deal status 500 Booked 1000 Abounded 400 Booked 1500 Lost 2000 Lost 1500 Abounded 4000 signed In the report view, I already created a table that includes the sum of the values for ‘Deal Status’ by every quarter… but I still want to add the win rate to the table for every quarter exactly as follow: Q1 Q2 Q3 Q4 Booked 10 12 11 14 Signed 1 2 3 4 Lost 14 15 16 18 Abounded 1 2 3 4 Win Rate 42% 44% 41% 44% Win rate calculation = sum of [deal value] for the booked [deal status]/sum of [deal value] for the booked [deal status]+sum of [deal value] for the Lost [deal status]. What do you think the best way to apply this? I hope it is easy for you to help. Thanks in advance.Solved8.1KViews0likes8CommentsSameperiodlastyear is giving me the total sales of last year instead of for the given time period
Hello Community, Hope your all well. So im currently working on income report for my company. I have calculated the total income and would now like to calculate the total income for the same period last year.Where my problem lies in is the fact that whenever I try to do the dax measure sameperiodlastyear it gives me the total income of last year instead of narrowing it down to the date filter I have selected. For reference my total income is calculated using the following measure: Deckunsbeitrag = SUMX( 'BES DE KOELN$VK-Umsatz Details', 'BES DE KOELN$VK-Umsatz Details'[DB (MW)] ) The sameperiodlastyear measure is the following: Deckunsbeitrag LY = CALCULATE( [Deckunsbeitrag], SAMEPERIODLASTYEAR(Datumstabelle[Date]) ) I then have a date filter which I put into a slicer on the dates ranging from the 01.01.21 to the 10.03.21.Like I previously explained the sameperiodlastyear measure takes the total income of the whole year instead of looking for the total income in the time period of 01.01.20 to the 10.03.20. Again for reference I do have a date table and use it so I'm very confused as to why I'm getting the total income of last year instead of getting it fo the given time period that I filter on on that page. Any help would be greatly appreciated and thank you all a lot .1.2KViews0likes4CommentsUnable to add condition on 2 measures.
Hi Team, I have a scenarios where I need to create 2 measures with some logic and basedon the 2 measure i need to create a new column or measure based on a condition. 2 measures Created Measure 1 : SUMX(Purch,(Purch[Inovice-Amt] * RELATED(Currency_Conv[Curr_Conv]))) Measure 2 : SUM('Purch'[Invoice_Qty]) I need to create a measure/column based on the 2 measures defined above. Measure 3 : If(Measure 1 < 0 and Measure 2 > 0 ,0 , Measure 2) I am able to create the measure but unable to get the desired output for which my My data in table is mismatching. For few Id's I am getting multiple rows which it is being summarized and giving correct values to Measure 1 and Measure 2. But for Measure 3 it should show as 0 but its showing my measure 2 value as it falling in else statement. I knew something is missing in measure 3 calculation. I would need it output of measure 3 as 0 not measure 2. I mean how do I write in measure 3 that it should check summarized value for both Measure 1 and Measure 2 based on that it should calculate measure 3 not row by row. Please guide me how to implement Measure 3 . Highly appreciate for the help. Thanks in advance.1.1KViews0likes3CommentsIs possible to show One Metric with details and rest simple by using Dax functions ?
Hello, I need to show measures dynamically in Grid or Matrix visual, I have a set of data with over 20+ Metrics precalculate in SQL. Those measures come from different Fact tables and it is with tabular data. Based on from audience request I am looking to see if can be possible to do this: Using Dynamic Slicer show in the front one measure with some extra analisis (frame in blue) then keep showing the rest of the other measures simple as thier value come. I am be able to change dynamically the blue frame but I wondering if it is possible to show the rest of the measures. I am looking to do it in DAX but let please know if this can be done under Dax or under Query Editor but my preference is under dax. For example from the slicer metric selection I choose metric A. This one show all the details related variance, vol, vol% , impact, etc. but then rest of the metrics not select show next the metric selected it. Then if Metric B is select show the details and rest of the metrics simple.(metric b is back wit rest of the metrics) If the Metric c is select the that change in the blue frame and now metric B and metric A are back wit the rest of the metrics Apprecite your advice and guide.2.1KViews0likes5CommentsIF STAMENT TO MAKE A FLAG ON A TABLE
hello can someone help me please here what i want to do i wrote a if statement to display in a column 1 or 0 if the date = to max date it should put 1 else 0 = IF('DATE DE DEMANDE'[DATE] = LASTDATE('DATE DE DEMANDE'[DATE]);1;0) but i'm getting 1 on all the columnSolved1.2KViews0likes5Comments