dax

Power BI: How to add slicer from a different table?

拥有回忆 提交于 2020-01-06 07:21:31
问题 I'm trying to plot a cumulative line chart in PowerBI and add some slicers to it. Let me first describe my data. My data looks as below: To plot a cumulative chart, I'm creating a new table using below formula: Cumulative = CALENDAR(DATE(2017, 9, 24), DATE(2017, 10, 12)) In this new table, I'm adding 2 more columns as below: Issues_Logged = COUNTROWS(FILTER(Sheet1, Sheet1[Creation_Date].[Date] <= Cumulative[Date].[Date])) + 0 Issues_Resolved = COUNTROWS(FILTER(Sheet1, Sheet1[Resolution_Date].

searching a keyword in DAX

亡梦爱人 提交于 2020-01-06 05:07:48
问题 I am trying to create a column in power BI that searches for a keyword in a column of a table and returns a category. For example: in table 1 there is a column with feedback and if it contains any keyword in the keyword column of table 2 ( which is updated regularly) a TRUE value is returned. The following code works great if the keyword is the only word in the sentence like "product broke after using it once" returns FALSE if looking for the keyword "broke" and the word "broke" used as the

searching a keyword in DAX

纵饮孤独 提交于 2020-01-06 05:07:11
问题 I am trying to create a column in power BI that searches for a keyword in a column of a table and returns a category. For example: in table 1 there is a column with feedback and if it contains any keyword in the keyword column of table 2 ( which is updated regularly) a TRUE value is returned. The following code works great if the keyword is the only word in the sentence like "product broke after using it once" returns FALSE if looking for the keyword "broke" and the word "broke" used as the

Rolling month average in power bi dax

不羁岁月 提交于 2020-01-05 05:53:15
问题 I have these two columns: SALES_CALLSID QFQ4TA5006C2 QZPIOA18LW8A QS4GSA300PU0 ....; and MEETING_DATE 7/10/2014 12:00 3/27/2015 12:00 11/3/2015 12:00 I need the count of the first column (salesid) but this count should be a trailing twelve month average for every month, i.e. for example for July- the count of sales id of july + count of last 11 months (i.e. based on the meeting date column), similarly this measure has to be made for every other month. The "Sales Call ID" column is a text

Filtered Measure seemingly not working

时光总嘲笑我的痴心妄想 提交于 2020-01-05 05:32:05
问题 I have this data: Then I have this donut of fruit: I have this measure to pick-up which fruit has been selected in the above donut: Selected Fruit = SELECTEDVALUE( Fruit[Fruit] ) It seems to work fine e.g. if I add this measure to a card and click Pear: Now comes the problem - I have a bar chart which has to have interactions turned off but still needs to be filtered by what has been selected in the donut - so I created this measure: Value Filtered = CALCULATE( SUM(Fruit[Value]) ,FILTER(

Filtered Measure seemingly not working

白昼怎懂夜的黑 提交于 2020-01-05 05:32:04
问题 I have this data: Then I have this donut of fruit: I have this measure to pick-up which fruit has been selected in the above donut: Selected Fruit = SELECTEDVALUE( Fruit[Fruit] ) It seems to work fine e.g. if I add this measure to a card and click Pear: Now comes the problem - I have a bar chart which has to have interactions turned off but still needs to be filtered by what has been selected in the donut - so I created this measure: Value Filtered = CALCULATE( SUM(Fruit[Value]) ,FILTER(

DAX - 2 phased weighted average with 2 different weight measures

那年仲夏 提交于 2020-01-05 05:31:07
问题 I have rather complex problem to expres. In DAX powerpivot I am trying to create measure which will be using two different Weighted averages in one measure based on aggregation level. The problem is complicated even more, because weight measures have different level of duplication (need to apply distinct SUM on them).I have been able to create Distinct SUM Measure1 and 2 to solve that. [Weight_1] = SUMX(DISTINCT(Table1[Level2],[SupportWeight1]) [SupportWeight1] = MAX(Table1[RevenueLevel2])

Inactive relationships affecting measures

随声附和 提交于 2020-01-05 04:33:11
问题 I have the following tables & relationships in our pbix report: For some obvious reasons, I need to have a relationship (non-active) between Dates[date] and Table2[T2Date]. However, doing so causes data fluctuation to measure 'Total Amount' in Table1. Here are some screenshots: Before Relationship (Dates[date] - Table2[T2Date]): After Relationship (Dates[date] - Table2[T2Date]): I need to understand why this difference is coming up and how the relationship is causing it since the measure uses

DAX: How do I write an IF statement to return a calculation for multiple (specific) values selected?

喜你入骨 提交于 2020-01-04 13:59:07
问题 This is driving me nuts. Let's say we want to use a slicer which has two distinct values to choose from a dimension. There is A and B. Let us also say that my Fact table is connected to this dimension, however it has the same dimension with more options. My slicer now has A, B and (Blank). No biggie. Let's now say I want to list out all of the possible calculation outcomes by selecting the slicer in a DAX formula, but in my visual I need all those outcomes to be listed in an IF() branched

Create 6 months rolling average on week filter

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 06:32:11
问题 I am trying to create a report, which should give weekly data but also a column for rolling 6 months till the last month and the same period last year. I am able to calculate the rolling average using the formula below: 6 months rolling = VAR period_end = CALCULATE( MAX('Dimensions'[Month Start Date]), FILTER( ALL('Dimensions'[Year Week]), 'Dimensions'[Year Week]=SELECTEDVALUE('Dimensions'[Year Week]) ) ) VAR period_till = FIRSTDATE( DATESINPERIOD( 'Dimensions'[Month Start Date], period_end,