How to use Power() and Exp() correctly in power bi

I have a simple function that is returning two different values in SQL and PowerBI. Here is the equation: 1 – power(0.9240, exp((-0.2201*((71/10)-7.036))+(0.2467*(0-0.5642))-(0.5567*((60/5)-7.222))+(0.4510*(log(13.5)-5.137)))) in SQL: SELECT 1 – power(0.9240, exp((-0.2201*((71/10)-7.036))+(0.2467*(0-0.5642))-(0.5567*((60/5)-7.222))+(0.4510*(log(13.5)-5.137)))) In SQL i get the correct value, 0.0015 but in PowerBI I get 0.0007783428. What do I need to change in my DAX expression so… Read More How to use Power() and Exp() correctly in power bi

DAX Total in Matrix

I have the following DAX expression: Daily Turnover = VAR applNos = CALCULATETABLE( DISTINCT(combined_apps[appl_appl_no]), combined_apps[table_type] = "TRAN", combined_apps[appl_decision_date] IN VALUES (‘calendar'[cal_posted_date]) ) RETURN CALCULATE( SUM(combined_apps[tran_amount]), REMOVEFILTERS(‘calendar’), combined_apps[appl_appl_no] IN applNos, combined_apps[table_type] = "TRAN" ) When placed into a matrix, with my date field, ‘calendar'[cal_posted_date] in the rows, the individual rows calculate correctly, however my total is… Read More DAX Total in Matrix

Is it possible to calculate the Count of text fields in a column in power bi

2024 Customer = CALCULATE(DISTINCTCOUNT(Table1[Group]),TREATAS({2024},Table1[Year])) Lost 2024 = IF([2024 Customer]=0,"LOST") I used the above measures to display lost customers as "LOST" in the table, I need to get the Count of "LOST". Does anyone have a solution for this? >Solution : I think you are asking how to count rows of a Measure value. Try: Lost… Read More Is it possible to calculate the Count of text fields in a column in power bi

PowerBI Dax SWITCH Function does not give the same answer as IF Function

I’m trying to do use a SWITCH function instead of IF function. I’m trying to search multiple columns (Column[1], Column[2]) within same sheet to return the value if it matches. When using SWITCH, column 8 does not have the values 00,01,02, the code does not run through all the expression, instead just provides the result… Read More PowerBI Dax SWITCH Function does not give the same answer as IF Function

Dashboard to compare different companies with different currencies

I have a table with multiple companies. Shop Currency S1 € S2 € S3 kr S4 £ S5 € And a table with the exchange rate Currency Exchange rate € 1.00000000000 £ 1.17100000000 kr 0.09730000000 When using a formula like this YearRevenue = SUM(Shop[Revenue]) * SUM(Currency[Exchange rate]) Logically what it now does is add all… Read More Dashboard to compare different companies with different currencies

Countrows with two filters

I simply want to count rows consisting number "1" and "2" in a column, I used the following measure: First time fix = CALCULATE(COUNTROWS(TICKET), TICKET[num_replies]=1 && TICKET[num_replies]=2 , USERELATIONSHIP(DIM_DATO[Opprettet], TICKET[Created])) But it returns blank, how should I change the syntax in order to return a number? >Solution : Use OR in place of AND First… Read More Countrows with two filters