If Condition

+2 votes
if [Dollars paid]<SUM([Claim_line].[Allowed_Amount_B6]) then 'Dollars lost'
elseif [Dollars paid]>SUM([Claim_line].[Allowed_Amount_B6]) then 'Accounts Received'
else 'Outstanding Receivables'
END  --- this Tableau Calculation.

please above calculation how to write the Dax Calculation in power bi?
Aug 20, 2019 in Power BI by vnk
1,515 views
Is [Claim_line].[Allowed_Amount_B6] one field or do you want to multiply them?

1 answer to this question.

+1 vote
DAX - I assume [Claim_line].[Allowed_Amount_B6] is one column.

if(table_name[Dollars paid]<SUM(table_name[Claim_line].[Allowed_Amount_B6]) ,'Dollars lost',
if(table_name[Dollars paid]>SUM(table_name[Claim_line].[Allowed_Amount_B6]),'Accounts Received','Outstanding Receivables'))
answered Aug 20, 2019 by anonymous
• 33,030 points
TableA= SUM(Paid), SUM(Patient Respons Amount)

TableB= SUM(Allowed Paid)

i written dax - measure calculation get solution but i need filter level measure calculation it is not working.

Actually these are two fields P=Paid+Unpaid and Allowed Paid

Allowed Paid=p then "Paid"
Allowed Paid<P then "Under"
Allowed Paid>P then "Over"

how to write DAX Calculation in Column or Measure? please detail? below example:

Allowed Paid  p(Paid+Patient Respons amount)

120                      20+30(50) = 120<50=Under

150                     130+100(230) = 150>230 =Over

200                     140+60(200)=200=200= Paid             finally_Filter(Paid,Under,Over)

Hi, Vnk. Check out the solution below.

If you want to add = 7 to Under or Over, then add as below. Depending on whether =7 be assigned to Under or Over.

IF([Table name][Allowed Paid] <=p,"Under","Over") 
#or
IF([Table name][Allowed Paid] <p,"Under","Over")

Else check for =7 condition using nested if.

IF([Table name][Allowed Paid] <p,"Under",IF([Table name][Allowed Paid] >p,"Over","Equal to 7"))

Hope it helps! 

Revert back if any problems.

PS: Do Signup to the community, it will help you get email notifications and keep you updated with new discussions on the Community :)

Hi Vnk,

Dax would work if p is a column. Then you can use the below DAX itself.

IF([Table name][Allowed Paid] <p,"Under",IF([Table name][Allowed Paid] >p,"Over","Paid"))

As per your example, p value changes for each row, So it should be a column and not a measure. Change p to a column and try again.

Hope you understood.

PS: Do Signup to the community, it will help you get email notifications and keep you updated with new discussions on the Community :)

Hi

1) How to deploy the report to Power Bi Report server?

2) i have 5 visualization and 1 tabular model in One Page so i need to export in to pdf all visualization and 1 tabular model. how to get this one?

Hi @Vnk,

For saving the report in Power bi server.

I've not tried it anytime, but I hope might help. Visit this page for more information.

https://docs.microsoft.com/en-us/power-bi/report-server/quickstart-create-powerbi-report

To export as a pdf, Export it PDF is available in the Power BI file tab.

It will,create a pdf of the report.

Related Questions In Power BI

0 votes
2 answers

Power BI Dax Multiple IF AND Statements

HI I have Column Patient 12 13 14 15 18 IN Patient=12, 13 Out ...READ MORE

answered May 23, 2019 in Power BI by VNK
18,936 views
0 votes
1 answer

Distinct count filtered by condition using Power BI Dax

Try this, it should work: DistinctCountActiveMonths = CALCULATE( ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,350 points
37,640 views
0 votes
1 answer

Count - using If within period of dates.

Hi Sindhu, Use below DAX code to create ...READ MORE

answered May 8, 2019 in Power BI by Cherukuri
• 33,030 points
694 views
+1 vote
2 answers

If and Else Statement to use in operator

Hey @Megha. I am new to Power BI ...READ MORE

answered Aug 29, 2019 in Power BI by anonymous
• 33,030 points
734 views
+2 votes
0 answers

Assume referential integrity

1) What is Assume referential integrity? what ...READ MORE

Aug 19, 2019 in Power BI by vnk
1,709 views
+2 votes
1 answer

How to export data to CSV from power bi embedded url ?

Hi Arathi, You can open Visuals from embedded ...READ MORE

answered Aug 23, 2019 in Power BI by anonymous
• 33,030 points
6,595 views
+1 vote
1 answer

Power Bi to Machine Learning Model

Hello @vnk! Power BI only supports Azure Machine ...READ MORE

answered Dec 3, 2019 in Power BI by Priyanka
1,079 views
0 votes
1 answer

last 10 days data based on Date&time

Hi, @Vnk, Regarding your query, you have to ...READ MORE

answered Jun 4, 2020 in Power BI by Gitika
• 65,770 points
3,536 views
0 votes
1 answer

add bar colors in power bi under condition

Hi Sindhu, Follow below steps to add colors ...READ MORE

answered Apr 8, 2019 in Power BI by Cherukuri
• 33,030 points
614 views
0 votes
1 answer

calculation with condition and filter

Hi Preethi, Follow the below steps: 1. Create a ...READ MORE

answered May 2, 2019 in Power BI by Cherukuri
• 33,030 points
888 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP